home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_fileutils.idb / usr / freeware / info / fileutils.info.z / fileutils.info
Encoding:
GNU Info File  |  1998-05-21  |  128.8 KB  |  3,380 lines

  1. This is Info file fileutils.info, produced by Makeinfo version 1.67
  2. from the input file fileutils.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * File utilities: (fileutils).  GNU file utilities.
  6. * chgrp: (fileutils)chgrp invocation.           Change file groups.
  7. * chown: (fileutils)chown invocation.           Change file owners/groups.
  8. * chmod: (fileutils)chmod invocation.           Change file permissions.
  9. * cp: (fileutils)cp invocation.                 Copy files.
  10. * dd: (fileutils)dd invocation.                 Copy and convert a file.
  11. * df: (fileutils)df invocation.                 Report filesystem disk usage.
  12. * dir: (fileutils)dir invocation.               List directories briefly.
  13. * dircolors: (fileutils)dircolors invocation.   Color setup for ls.
  14. * du: (fileutils)du invocation.                 Report on disk usage.
  15. * install: (fileutils)install invocation.       Copy and change attributes.
  16. * ln: (fileutils)ln invocation.                 Make links between files.
  17. * ls: (fileutils)ls invocation.                 List directory contents.
  18. * mkdir: (fileutils)mkdir invocation.           Create directories.
  19. * mkfifo: (fileutils)mkfifo invocation.         Create FIFOs: (named pipes).
  20. * mknod: (fileutils)mknod invocation.           Create special files.
  21. * mv: (fileutils)mv invocation.                 Rename files.
  22. * rm: (fileutils)rm invocation.                 Remove files.
  23. * rmdir: (fileutils)rmdir invocation.           Remove empty directories.
  24. * sync: (fileutils)sync invocation.             Synchronize memory and disk.
  25. * touch: (fileutils)touch invocation.           Change file timestamps.
  26. * vdir: (fileutils)vdir invocation.             List directories verbosely.
  27. END-INFO-DIR-ENTRY
  28.  
  29.    This file documents the GNU set of file utilities.
  30.  
  31.    Copyright (C) 1994, 95, 96 Free Software Foundation, Inc.
  32.  
  33.    Permission is granted to make and distribute verbatim copies of this
  34. manual provided the copyright notice and this permission notice are
  35. preserved on all copies.
  36.  
  37.    Permission is granted to copy and distribute modified versions of
  38. this manual under the conditions for verbatim copying, provided that
  39. the entire resulting derived work is distributed under the terms of a
  40. permission notice identical to this one.
  41.  
  42.    Permission is granted to copy and distribute translations of this
  43. manual into another language, under the above conditions for modified
  44. versions, except that this permission notice may be stated in a
  45. translation approved by the Foundation.
  46.  
  47. 
  48. File: fileutils.info,  Node: Top,  Next: Introduction,  Up: (dir)
  49.  
  50. GNU file utilities
  51. ******************
  52.  
  53.    This manual minimally documents version 3.16 of the GNU file
  54. utilities.
  55.  
  56. * Menu:
  57.  
  58. * Introduction::                Caveats, overview, and authors.
  59. * Common options::              Common options.
  60. * File permissions::            Access modes.
  61. * Date input formats::          Specifying date strings.
  62. * Directory listing::           ls dir vdir d v dircolors
  63. * Basic operations::            cp dd install mv rm
  64. * Special file types::          ln mkdir rmdir mkfifo mknod
  65. * Changing file attributes::    chgrp chmod chown touch
  66. * Disk usage::                  df du sync
  67. * Index::                       General index.
  68.  
  69. 
  70. File: fileutils.info,  Node: Introduction,  Next: Common options,  Prev: Top,  Up: Top
  71.  
  72. Introduction
  73. ************
  74.  
  75.    This manual is incomplete: No attempt is made to explain basic file
  76. concepts in a way suitable for novices.  Thus, if you are interested,
  77. please get involved in improving this manual.  The entire GNU community
  78. will benefit.
  79.  
  80.    The GNU file utilities are mostly compatible with the POSIX.2
  81. standard.
  82.  
  83.    Please report bugs to `fileutils-bugs@gnu.ai.mit.edu'.  Remember to
  84. include the version number, machine architecture, input files, and any
  85. other information needed to reproduce the bug: your input, what you
  86. expected, what you got, and why it is wrong.  Diffs are welcome, but
  87. please include a description of the problem as well, since this is
  88. sometimes difficult to infer. *Note Bugs: (gcc)Bugs.
  89.  
  90.    This manual is based on the Unix man pages in the distribution, which
  91. were originally written by David MacKenzie and updated by Jim Meyering.
  92. Franc,ois Pinard did the initial conversion to Texinfo format.  Karl
  93. Berry did the indexing, some reorganization, and editing of the results.
  94. Richard Stallman contributed his usual invaluable insights to the
  95. overall process.
  96.  
  97. 
  98. File: fileutils.info,  Node: Common options,  Next: File permissions,  Prev: Introduction,  Up: Top
  99.  
  100. Common options
  101. **************
  102.  
  103.    Certain options are available in all of these programs (in fact,
  104. every GNU program should accept them).  Rather than writing identical
  105. descriptions for each of the programs, they are described here.
  106.  
  107. `--help'
  108.      Print a usage message listing all available options, then exit
  109.      successfully.
  110.  
  111. `--version'
  112.      Print the version number, then exit successfully.
  113.  
  114. * Menu:
  115.  
  116. * Backup options::              -b -S -V, in some programs.
  117.  
  118. 
  119. File: fileutils.info,  Node: Backup options,  Up: Common options
  120.  
  121. Backup options
  122. ==============
  123.  
  124.    Some GNU programs (at least `cp', `install', `ln', and `mv')
  125. optionally make backups of files before writing new versions.  These
  126. options control the details of these backups.  The options are also
  127. briefly mentioned in the descriptions of the particular programs.
  128.  
  129. `-b'
  130. `--backup'
  131.      Make backups of files that are about to be overwritten or removed.
  132.      Without this option, the original versions are destroyed.
  133.  
  134. `-S SUFFIX'
  135. `--suffix=SUFFIX'
  136.      Append SUFFIX to each backup file made with `-b'.  If this option
  137.      is not specified, the value of the `SIMPLE_BACKUP_SUFFIX'
  138.      environment variable is used.  And if `SIMPLE_BACKUP_SUFFIX' is not
  139.      set, the default is `~', just as in Emacs.
  140.  
  141. `-V METHOD'
  142. `--version-control=METHOD'
  143.      Use METHOD to determine the type of backups made with `-b'.  If
  144.      this option is not specified, the value of the `VERSION_CONTROL'
  145.      environment variable is used.  And if `VERSION_CONTROL' is not set,
  146.      the default backup type is `existing'.
  147.  
  148.      This option corresponds to the Emacs variable `version-control';
  149.      the same values for METHOD are accepted as in Emacs.  This options
  150.      also more descriptive name.  The valid METHODs (unique
  151.      abbreviations are accepted):
  152.  
  153.     `t'
  154.     `numbered'
  155.           Always make numbered backups.
  156.  
  157.     `nil'
  158.     `existing'
  159.           Make numbered backups of files that already have them, simple
  160.           backups of the others.
  161.  
  162.     `never'
  163.     `simple'
  164.           Always make simple backups.
  165.  
  166. 
  167. File: fileutils.info,  Node: File permissions,  Next: Date input formats,  Prev: Common options,  Up: Top
  168.  
  169. File permissions
  170. ****************
  171.  
  172.    Each file has a set of "permissions" that control the kinds of
  173. access that users have to that file.  The permissions for a file are
  174. also called its "access mode".  They can be represented either in
  175. symbolic form or as an octal number.
  176.  
  177. * Menu:
  178.  
  179. * Mode Structure::              Structure of file permissions.
  180. * Symbolic Modes::              Mnemonic permissions representation.
  181. * Numeric Modes::               Permissions as octal numbers.
  182.  
  183. 
  184. File: fileutils.info,  Node: Mode Structure,  Next: Symbolic Modes,  Up: File permissions
  185.  
  186. Structure of File Permissions
  187. =============================
  188.  
  189.    There are three kinds of permissions that a user can have for a file:
  190.  
  191.   1. permission to read the file.  For directories, this means
  192.      permission to list the contents of the directory.
  193.  
  194.   2. permission to write to (change) the file.  For directories, this
  195.      means permission to create and remove files in the directory.
  196.  
  197.   3. permission to execute the file (run it as a program).  For
  198.      directories, this means permission to access files in the
  199.      directory.
  200.  
  201.    There are three categories of users who may have different
  202. permissions to perform any of the above operations on a file:
  203.  
  204.   1. the file's owner;
  205.  
  206.   2. other users who are in the file's group;
  207.  
  208.   3. everyone else.
  209.  
  210.    Files are given an owner and group when they are created.  Usually
  211. the owner is the current user and the group is the group of the
  212. directory the file is in, but this varies with the operating system, the
  213. filesystem the file is created on, and the way the file is created.  You
  214. can change the owner and group of a file by using the `chown' and
  215. `chgrp' commands.
  216.  
  217.    In addition to the three sets of three permissions listed above, a
  218. file's permissions have three special components, which affect only
  219. executable files (programs) and, on some systems, directories:
  220.  
  221.   1. set the process's effective user ID to that of the file upon
  222.      execution (called the "setuid bit").  No effect on directories.
  223.  
  224.   2. set the process's effective group ID to that of the file upon
  225.      execution (called the "setgid bit").  For directories on some
  226.      systems, put files created in the directory into the same group as
  227.      the directory, no matter what group the user who creates them is
  228.      in.
  229.  
  230.   3. save the program's text image on the swap device so it will load
  231.      more quickly when run (called the "sticky bit").  For directories
  232.      on some systems, prevent users from removing files that they do
  233.      not own in the directory; this is called making the directory
  234.      "append-only".
  235.  
  236. 
  237. File: fileutils.info,  Node: Symbolic Modes,  Next: Numeric Modes,  Prev: Mode Structure,  Up: File permissions
  238.  
  239. Symbolic Modes
  240. ==============
  241.  
  242.    "Symbolic modes" represent changes to files' permissions as
  243. operations on single-character symbols.  They allow you to modify either
  244. all or selected parts of files' permissions, optionally based on their
  245. previous values, and perhaps on the current `umask' as well (*note
  246. Umask and Protection::.).
  247.  
  248.    The format of symbolic modes is:
  249.  
  250.      [ugoa...][[+-=][rwxXstugo...]...][,...]
  251.  
  252.    The following sections describe the operators and other details of
  253. symbolic modes.
  254.  
  255. * Menu:
  256.  
  257. * Setting Permissions::          Basic operations on permissions.
  258. * Copying Permissions::          Copying existing permissions.
  259. * Changing Special Permissions:: Special permissions.
  260. * Conditional Executability::    Conditionally affecting executability.
  261. * Multiple Changes::             Making multiple changes.
  262. * Umask and Protection::              The effect of the umask.
  263.  
  264. 
  265. File: fileutils.info,  Node: Setting Permissions,  Next: Copying Permissions,  Up: Symbolic Modes
  266.  
  267. Setting Permissions
  268. -------------------
  269.  
  270.    The basic symbolic operations on a file's permissions are adding,
  271. removing, and setting the permission that certain users have to read,
  272. write, and execute the file.  These operations have the following
  273. format:
  274.  
  275.      USERS OPERATION PERMISSIONS
  276.  
  277. The spaces between the three parts above are shown for readability only;
  278. symbolic modes can not contain spaces.
  279.  
  280.    The USERS part tells which users' access to the file is changed.  It
  281. consists of one or more of the following letters (or it can be empty;
  282. *note Umask and Protection::., for a description of what happens then).
  283. When more than one of these letters is given, the order that they are
  284. in does not matter.
  285.  
  286. `u'
  287.      the user who owns the file;
  288.  
  289. `g'
  290.      other users who are in the file's group;
  291.  
  292. `o'
  293.      all other users;
  294.  
  295. `a'
  296.      all users; the same as `ugo'.
  297.  
  298.    The OPERATION part tells how to change the affected users' access to
  299. the file, and is one of the following symbols:
  300.  
  301. `+'
  302.      to add the PERMISSIONS to whatever permissions the USERS already
  303.      have for the file;
  304.  
  305. `-'
  306.      to remove the PERMISSIONS from whatever permissions the USERS
  307.      already have for the file;
  308.  
  309. `='
  310.      to make the PERMISSIONS the only permissions that the USERS have
  311.      for the file.
  312.  
  313.    The PERMISSIONS part tells what kind of access to the file should be
  314. changed; it is zero or more of the following letters.  As with the
  315. USERS part, the order does not matter when more than one letter is
  316. given.  Omitting the PERMISSIONS part is useful only with the `='
  317. operation, where it gives the specified USERS no access at all to the
  318. file.
  319.  
  320. `r'
  321.      the permission the USERS have to read the file;
  322.  
  323. `w'
  324.      the permission the USERS have to write to the file;
  325.  
  326. `x'
  327.      the permission the USERS have to execute the file.
  328.  
  329.    For example, to give everyone permission to read and write a file,
  330. but not to execute it, use:
  331.  
  332.      a=rw
  333.  
  334.    To remove write permission for from all users other than the file's
  335. owner, use:
  336.  
  337.      go-w
  338.  
  339. The above command does not affect the access that the owner of the file
  340. has to it, nor does it affect whether other users can read or execute
  341. the file.
  342.  
  343.    To give everyone except a file's owner no permission to do anything
  344. with that file, use the mode below.  Other users could still remove the
  345. file, if they have write permission on the directory it is in.
  346.  
  347.      go=
  348.  
  349. Another way to specify the same thing is:
  350.  
  351.      og-rxw
  352.  
  353. 
  354. File: fileutils.info,  Node: Copying Permissions,  Next: Changing Special Permissions,  Prev: Setting Permissions,  Up: Symbolic Modes
  355.  
  356. Copying Existing Permissions
  357. ----------------------------
  358.  
  359.    You can base a file's permissions on its existing permissions.  To do
  360. this, instead of using `r', `w', or `x' after the operator, you use the
  361. letter `u', `g', or `o'.  For example, the mode
  362.      o+g
  363.  
  364. adds the permissions for users who are in a file's group to the
  365. permissions that other users have for the file.  Thus, if the file
  366. started out as mode 664 (`rw-rw-r--'), the above mode would change it
  367. to mode 666 (`rw-rw-rw-').  If the file had started out as mode 741
  368. (`rwxr----x'), the above mode would change it to mode 745
  369. (`rwxr--r-x').  The `-' and `=' operations work analogously.
  370.  
  371. 
  372. File: fileutils.info,  Node: Changing Special Permissions,  Next: Conditional Executability,  Prev: Copying Permissions,  Up: Symbolic Modes
  373.  
  374. Changing Special Permissions
  375. ----------------------------
  376.  
  377.    In addition to changing a file's read, write, and execute
  378. permissions, you can change its special permissions.  *Note Mode
  379. Structure::, for a summary of these permissions.
  380.  
  381.    To change a file's permission to set the user ID on execution, use
  382. `u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
  383. part.
  384.  
  385.    To change a file's permission to set the group ID on execution, use
  386. `g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
  387. part.
  388.  
  389.    To change a file's permission to stay permanently on the swap device,
  390. use `o' in the USERS part of the symbolic mode and `t' in the
  391. PERMISSIONS part.
  392.  
  393.    For example, to add set user ID permission to a program, you can use
  394. the mode:
  395.  
  396.      u+s
  397.  
  398.    To remove both set user ID and set group ID permission from it, you
  399. can use the mode:
  400.  
  401.      ug-s
  402.  
  403.    To cause a program to be saved on the swap device, you can use the
  404. mode:
  405.  
  406.      o+t
  407.  
  408.    Remember that the special permissions only affect files that are
  409. executable, plus, on some systems, directories (on which they have
  410. different meanings; *note Mode Structure::.).  Using `a' in the USERS
  411. part of a symbolic mode does not cause the special permissions to be
  412. affected; thus,
  413.  
  414.      a+s
  415.  
  416. has *no effect*.  You must use `u', `g', and `o' explicitly to affect
  417. the special permissions.  Also, the combinations `u+t', `g+t', and
  418. `o+s' have no effect.
  419.  
  420.    The `=' operator is not very useful with special permissions; for
  421. example, the mode:
  422.  
  423.      o=t
  424.  
  425. does cause the file to be saved on the swap device, but it also removes
  426. all read, write, and execute permissions that users not in the file's
  427. group might have had for it.
  428.  
  429. 
  430. File: fileutils.info,  Node: Conditional Executability,  Next: Multiple Changes,  Prev: Changing Special Permissions,  Up: Symbolic Modes
  431.  
  432. Conditional Executability
  433. -------------------------
  434.  
  435.    There is one more special type of symbolic permission: if you use
  436. `X' instead of `x', execute permission is affected only if the file
  437. already had execute permission or is a directory.  It affects
  438. directories' execute permission even if they did not initially have any
  439. execute permissions set.
  440.  
  441.    For example, this mode:
  442.  
  443.      a+X
  444.  
  445. gives all users permission to execute files (or search directories) if
  446. anyone could before.
  447.  
  448. 
  449. File: fileutils.info,  Node: Multiple Changes,  Next: Umask and Protection,  Prev: Conditional Executability,  Up: Symbolic Modes
  450.  
  451. Making Multiple Changes
  452. -----------------------
  453.  
  454.    The format of symbolic modes is actually more complex than described
  455. above (*note Setting Permissions::.).  It provides two ways to make
  456. multiple changes to files' permissions.
  457.  
  458.    The first way is to specify multiple OPERATION and PERMISSIONS parts
  459. after a USERS part in the symbolic mode.
  460.  
  461.    For example, the mode:
  462.  
  463.      og+rX-w
  464.  
  465. gives users other than the owner of the file read permission and, if it
  466. is a directory or if someone already had execute permission to it,
  467. gives them execute permission; and it also denies them write permission
  468. to it file.  It does not affect the permission that the owner of the
  469. file has for it.  The above mode is equivalent to the two modes:
  470.  
  471.      og+rX
  472.      og-w
  473.  
  474.    The second way to make multiple changes is to specify more than one
  475. simple symbolic mode, separated by commas.  For example, the mode:
  476.  
  477.      a+r,go-w
  478.  
  479. gives everyone permission to read the file and removes write permission
  480. on it for all users except its owner.  Another example:
  481.  
  482.      u=rwx,g=rx,o=
  483.  
  484. sets all of the non-special permissions for the file explicitly.  (It
  485. gives users who are not in the file's group no permission at all for
  486. it.)
  487.  
  488.    The two methods can be combined.  The mode:
  489.  
  490.      a+r,g+x-w
  491.  
  492. gives all users permission to read the file, and gives users who are in
  493. the file's group permission to execute it, as well, but not permission
  494. to write to it.  The above mode could be written in several different
  495. ways; another is:
  496.  
  497.      u+r,g+rx,o+r,g-w
  498.  
  499. 
  500. File: fileutils.info,  Node: Umask and Protection,  Prev: Multiple Changes,  Up: Symbolic Modes
  501.  
  502. The Umask and Protection
  503. ------------------------
  504.  
  505.    If the USERS part of a symbolic mode is omitted, it defaults to `a'
  506. (affect all users), except that any permissions that are *set* in the
  507. system variable `umask' are *not affected*.  The value of `umask' can
  508. be set using the `umask' command.  Its default value varies from system
  509. to system.
  510.  
  511.    Omitting the USERS part of a symbolic mode is generally not useful
  512. with operations other than `+'.  It is useful with `+' because it
  513. allows you to use `umask' as an easily customizable protection against
  514. giving away more permission to files than you intended to.
  515.  
  516.    As an example, if `umask' has the value 2, which removes write
  517. permission for users who are not in the file's group, then the mode:
  518.  
  519.      +w
  520.  
  521. adds permission to write to the file to its owner and to other users who
  522. are in the file's group, but *not* to other users.  In contrast, the
  523. mode:
  524.  
  525.      a+w
  526.  
  527. ignores `umask', and *does* give write permission for the file to all
  528. users.
  529.  
  530. 
  531. File: fileutils.info,  Node: Numeric Modes,  Prev: Symbolic Modes,  Up: File permissions
  532.  
  533. Numeric Modes
  534. =============
  535.  
  536.    File permissions are stored internally as 16 bit integers.  As an
  537. alternative to giving a symbolic mode, you can give an octal (base 8)
  538. number that corresponds to the internal representation of the new mode.
  539. This number is always interpreted in octal; you do not have to add a
  540. leading 0, as you do in C.  Mode 0055 is the same as mode 55.
  541.  
  542.    A numeric mode is usually shorter than the corresponding symbolic
  543. mode, but it is limited in that it can not take into account a file's
  544. previous permissions; it can only set them absolutely.
  545.  
  546.    The permissions granted to the user, to other users in the file's
  547. group, and to other users not in the file's group are each stored as
  548. three bits, which are represented as one octal digit.  The three special
  549. permissions are also each stored as one bit, and they are as a group
  550. represented as another octal digit.  Here is how the bits are arranged
  551. in the 16 bit integer, starting with the lowest valued bit:
  552.  
  553.      Value in  Corresponding
  554.      Mode      Permission
  555.      
  556.                Other users not in the file's group:
  557.         1      Execute
  558.         2      Write
  559.         4      Read
  560.      
  561.                Other users in the file's group:
  562.        10      Execute
  563.        20      Write
  564.        40      Read
  565.      
  566.                The file's owner:
  567.       100      Execute
  568.       200      Write
  569.       400      Read
  570.      
  571.                Special permissions:
  572.      1000      Save text image on swap device
  573.      2000      Set group ID on execution
  574.      4000      Set user ID on execution
  575.  
  576.    For example, numeric mode 4755 corresponds to symbolic mode
  577. `u=rwxs,go=rx', and numeric mode 664 corresponds to symbolic mode
  578. `ug=rw,o=r'.  Numeric mode 0 corresponds to symbolic mode `ugo='.
  579.  
  580. 
  581. File: fileutils.info,  Node: Date input formats,  Next: Directory listing,  Prev: File permissions,  Up: Top
  582.  
  583. Date input formats
  584. ******************
  585.  
  586.      Our units of temporal measurement, from seconds on up to months,
  587.      are so complicated, asymmetrical and disjunctive so as to make
  588.      coherent mental reckoning in time all but impossible.  Indeed, had
  589.      some tyrannical god contrived to enslave our minds to time, to
  590.      make it all but impossible for us to escape subjection to sodden
  591.      routines and unpleasant surprises, he could hardly have done
  592.      better than handing down our present system.  It is like a set of
  593.      trapezoidal building blocks, with no vertical or horizontal
  594.      surfaces, like a language in which the simplest thought demands
  595.      ornate constructions, useless particles and lengthy
  596.      circumlocutions.  Unlike the more successful patterns of language
  597.      and science, which enable us to face experience boldly or at least
  598.      level-headedly, our system of temporal calculation silently and
  599.      persistently encourages our terror of time.
  600.  
  601.      ...  It is as though architects had to measure length in feet,
  602.      width in meters and height in ells; as though basic instruction
  603.      manuals demanded a knowledge of five different languages.  It is
  604.      no wonder then that we often look into our own immediate past or
  605.      future, last Tuesday or a week from Sunday, with feelings of
  606.      helpless confusion.  ...
  607.  
  608.      -- Robert Grudin, `Time and the Art of Living'.
  609.  
  610.    This section describes the textual date representations that GNU
  611. programs accept.  These are the strings you, as a user, can supply as
  612. arguments to the various programs.  The C interface (via the `getdate'
  613. function) is not described here.
  614.  
  615.    Although the date syntax here can represent any possible time since
  616. zero A.D., computer integers are not big enough for such a
  617. (comparatively) long time.  The earliest date semantically allowed on
  618. Unix systems is midnight, 1 January 1970 UCT.
  619.  
  620. * Menu:
  621.  
  622. * General date syntax::            Common rules.
  623. * Calendar date item::             19 Dec 1994.
  624. * Time of day item::               9:20pm.
  625. * Timezone item::                  EST, DST, BST, UCT, AHST, ...
  626. * Day of week item::               Monday and others.
  627. * Relative item in date strings::  next tuesday, 2 years ago.
  628. * Pure numbers in date strings::   19931219, 1440.
  629. * Authors of getdate::             Bellovin, Salz, Berets, et al.
  630.  
  631. 
  632. File: fileutils.info,  Node: General date syntax,  Next: Calendar date item,  Up: Date input formats
  633.  
  634. General date syntax
  635. ===================
  636.  
  637.    A "date" is a string, possibly empty, containing many items
  638. separated by whitespace.  The whitespace may be omitted when no
  639. ambiguity arises.  The empty string means the beginning of today (i.e.,
  640. midnight).  Order of the items is immaterial.  A date string may contain
  641. many flavors of items:
  642.  
  643.    * calendar date items
  644.  
  645.    * time of the day items
  646.  
  647.    * time zone items
  648.  
  649.    * day of the week items
  650.  
  651.    * relative items
  652.  
  653.    * pure numbers.
  654.  
  655. We describe each of these item types in turn, below.
  656.  
  657.    A few numbers may be written out in words in most contexts.  This is
  658. most useful for specifying day of the week items or relative items (see
  659. below).  Here is the list: `first' for 1, `next' for 2, `third' for 3,
  660. `fourth' for 4, `fifth' for 5, `sixth' for 6, `seventh' for 7, `eighth'
  661. for 8, `ninth' for 9, `tenth' for 10, `eleventh' for 11 and `twelfth'
  662. for 12.  Also, `last' means exactly -1.
  663.  
  664.    When a month is written this way, it is still considered to be
  665. written numerically, instead of being "spelled in full"; this changes
  666. the allowed strings.
  667.  
  668.    Alphabetic case is completely ignored in dates.  Comments may be
  669. introduced between round parentheses, as long as included parentheses
  670. are properly nested.  Hyphens not followed by a digit are currently
  671. ignored.  Leading zeros on numbers are ignored.
  672.  
  673. 
  674. File: fileutils.info,  Node: Calendar date item,  Next: Time of day item,  Prev: General date syntax,  Up: Date input formats
  675.  
  676. Calendar date item
  677. ==================
  678.  
  679.    A "calendar date item" specifies a day of the year.  It is specified
  680. differently, depending on whether the month is specified numerically or
  681. literally.  All these strings specify the same calendar date:
  682.  
  683.      1970-09-17           # ISO 8601.
  684.      70-9-17              # This century assumed by default.
  685.      70-09-17             # Leading zeros are ignored.
  686.      9/17/72              # Common U.S. writing.
  687.      24 September 1972
  688.      24 Sept 72           # September has a special abbreviation.
  689.      24 Sep 72            # Three-letter abbreviations always allowed.
  690.      Sep 24, 1972
  691.      24-sep-72
  692.      24sep72
  693.  
  694.    The year can also be omitted.  In this case, the last specified year
  695. is used, or the current year if none.  For example:
  696.  
  697.      9/17
  698.      sep 17
  699.  
  700.    Here are the rules.
  701.  
  702.    For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed,
  703. where YEAR is any positive number, MONTH is a number between 01 and 12,
  704. and DAY is a number between 01 and 31.  A leading zero must be present
  705. if a number is less than ten.  If YEAR is less than 100, then 1900 is
  706. added to it to force a date in this century.  The construct
  707. `MONTH/DAY/YEAR', popular in the United States, is accepted.  Also
  708. `MONTH/DAY', omitting the year.
  709.  
  710.    Literal months may be spelled out in full: `January', `February',
  711. `March', `April', `May', `June', `July', `August', `September',
  712. `October', `November' or `December'.  Literal months may be abbreviated
  713. to their first three letters, possibly followed by an abbreviating dot.
  714. It is also permitted to write `Sept' instead of `September'.
  715.  
  716.    When months are written literally, the calendar date may be given as
  717. any of the following:
  718.  
  719.      DAY MONTH YEAR
  720.      DAY MONTH
  721.      MONTH DAY YEAR
  722.      DAY-MONTH-YEAR
  723.  
  724.    Or, omitting the year:
  725.  
  726.      MONTH DAY
  727.  
  728. 
  729. File: fileutils.info,  Node: Time of day item,  Next: Timezone item,  Prev: Calendar date item,  Up: Date input formats
  730.  
  731. Time of day item
  732. ================
  733.  
  734.    A "time of day item" in date strings specifies the time on a given
  735. day.  Here are some examples, all of which represent the same time:
  736.  
  737.      20:02:0
  738.      20:02
  739.      8:02pm
  740.      20:02-0500      # In EST (Eastern U.S. Standard Time).
  741.  
  742.    More generally, the time of the day may be given as
  743. `HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE
  744. is a number between 0 and 59, and SECOND is a number between 0 and 59.
  745. Alternatively, `:SECOND' can be omitted, in which case it is taken to
  746. be zero.
  747.  
  748.    If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR
  749. is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken
  750. to be zero).  `am' indicates the first half of the day, `pm' indicates
  751. the second half of the day.  In this notation, 12 is the predecessor of
  752. 1: midnight is `12am' while noon is `12pm'.
  753.  
  754.    The time may alternatively be followed by a timezone correction,
  755. expressed as `SHHMM', where S is `+' or `-', HH is a number of zone
  756. hours and MM is a number of zone minutes.  When a timezone correction
  757. is given this way, it forces interpretation of the time in UTC,
  758. overriding any previous specification for the timezone or the local
  759. timezone.  The MINUTE part of the time of the day may not be elided
  760. when a timezone correction is used.  This is the only way to specify a
  761. timezone correction by fractional parts of an hour.
  762.  
  763.    Either `am'/`pm' or a timezone correction may be specified, but not
  764. both.
  765.  
  766. 
  767. File: fileutils.info,  Node: Timezone item,  Next: Day of week item,  Prev: Time of day item,  Up: Date input formats
  768.  
  769. Timezone item
  770. =============
  771.  
  772.    A "timezone item" specifies an international timezone, indicated by
  773. a small set of letters.  Any included period is ignored.  Military
  774. timezone designations use a single letter.  Currently, only integral
  775. zone hours may be represented in a timezone item.  See the previous
  776. section for a finer control over the timezone correction.
  777.  
  778.    Here are many non-daylight-savings-time timezones, indexed by the
  779. zone hour value.
  780.  
  781. +000
  782.      `GMT' for Greenwich Mean, `UT' or `UTC' for Universal
  783.      (Coordinated), `WET' for Western European and `Z' for militaries.
  784.  
  785. +100
  786.      `WAT' for West Africa and `A' for militaries.
  787.  
  788. +200
  789.      `AT' for Azores and `B' for militaries.
  790.  
  791. +300
  792.      `C' for militaries.
  793.  
  794. +400
  795.      `AST' for Atlantic Standard and `D' for militaries.
  796.  
  797. +500
  798.      `E' for militaries and `EST' for Eastern Standard.
  799.  
  800. +600
  801.      `CST' for Central Standard and `F' for militaries.
  802.  
  803. +700
  804.      `G' for militaries and `MST' for Mountain Standard.
  805.  
  806. +800
  807.      `H' for militaries and `PST' for Pacific Standard.
  808.  
  809. +900
  810.      `I' for militaries and `YST' for Yukon Standard.
  811.  
  812. +1000
  813.      `AHST' for Alaska-Hawaii Standard, `CAT' for Central Alaska, `HST'
  814.      for Hawaii Standard and `K' for militaries.
  815.  
  816. +1100
  817.      `L' for militaries and `NT' for Nome.
  818.  
  819. +1200
  820.      `IDLW' for International Date Line West and `M' for militaries.
  821.  
  822. -100
  823.      `CET' for Central European, `FWT' for French Winter, `MET' for
  824.      Middle European, `MEWT' for Middle European Winter, `N' for
  825.      militaries and `SWT' for Swedish Winter.
  826.  
  827. -200
  828.      `EET' for Eastern European, USSR Zone 1 and `O' for militaries.
  829.  
  830. -300
  831.      `BT' for Baghdad, USSR Zone 2 and `P' for militaries.
  832.  
  833. -400
  834.      `Q' for militaries and `ZP4' for USSR Zone 3.
  835.  
  836. -500
  837.      `R' for militaries and `ZP5' for USSR Zone 4.
  838.  
  839. -600
  840.      `S' for militaries and `ZP6' for USSR Zone 5.
  841.  
  842. -700
  843.      `T' for militaries and `WAST' for West Australian Standard.
  844.  
  845. -800
  846.      `CCT' for China Coast, USSR Zone 7 and `U' for militaries.
  847.  
  848. -900
  849.      `JST' for Japan Standard, USSR Zone 8 and `V' for militaries.
  850.  
  851. -1000
  852.      `EAST' for East Australian Standard, `GST' for Guam Standard, USSR
  853.      Zone 9 and `W' for militaries.
  854.  
  855. -1100
  856.      `X' for militaries.
  857.  
  858. -1200
  859.      `IDLE' for International Date Line East, `NZST' for New Zealand
  860.      Standard, `NZT' for New Zealand and `Y' for militaries.
  861.  
  862.    Here are many DST timezones, indexed by the zone hour value.  Also,
  863. by following a non-DST timezone by the string `DST' in a separate word
  864. (that is, separated by some whitespace), the corresponding DST timezone
  865. may be specified.
  866.  
  867. 0
  868.      `BST' for British Summer.
  869.  
  870. +400
  871.      `ADT' for Atlantic Daylight.
  872.  
  873. +500
  874.      `EDT' for Eastern Daylight.
  875.  
  876. +600
  877.      `CDT' for Central Daylight.
  878.  
  879. +700
  880.      `MDT' for Mountain Daylight.
  881.  
  882. +800
  883.      `PDT' for Pacific Daylight.
  884.  
  885. +900
  886.      `YDT' for Yukon Daylight.
  887.  
  888. +1000
  889.      `HDT' for Hawaii Daylight.
  890.  
  891. -100
  892.      `MEST' for Middle European Summer, `MESZ' for Middle European
  893.      Summer, `SST' for Swedish Summer and `FST' for French Summer.
  894.  
  895. -700
  896.      `WADT' for West Australian Daylight.
  897.  
  898. -1000
  899.      `EADT' for Eastern Australian Daylight.
  900.  
  901. -1200
  902.      `NZDT' for New Zealand Daylight.
  903.  
  904. 
  905. File: fileutils.info,  Node: Day of week item,  Next: Relative item in date strings,  Prev: Timezone item,  Up: Date input formats
  906.  
  907. Day of week item
  908. ================
  909.  
  910.    The explicit mention of a day of the week will forward the date
  911. (only if necessary) to reach that day of the week in the future.
  912.  
  913.    Days of the week may be spelled out in full: `Sunday', `Monday',
  914. `Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'.  Days may
  915. be abbreviated to their first three letters, optionally followed by a
  916. period.  The special abbreviations `Tues' for `Tuesday', `Wednes' for
  917. `Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.
  918.  
  919.    A number may precede a day of the week item to move forward
  920. supplementary weeks.  It is best used in expression like `third
  921. monday'.  In this context, `last DAY' or `next DAY' is also acceptable;
  922. they move one week before or after the day that DAY by itself would
  923. represent.
  924.  
  925.    A comma following a day of the week item is ignored.
  926.  
  927. 
  928. File: fileutils.info,  Node: Relative item in date strings,  Next: Pure numbers in date strings,  Prev: Day of week item,  Up: Date input formats
  929.  
  930. Relative item in date strings
  931. =============================
  932.  
  933.    "Relative items" adjust a date (or the current date if none) forward
  934. or backward.  The effects of relative items accumulate.  Here are some
  935. examples:
  936.  
  937.      1 year
  938.      1 year ago
  939.      3 years
  940.      2 days
  941.  
  942.    The unit of time displacement may be selected by the string `year'
  943. or `month' for moving by whole years or months.  These are fuzzy units,
  944. as years and months are not all of equal duration.  More precise units
  945. are `fortnight' which is worth 14 days, `week' worth 7 days, `day'
  946. worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60
  947. seconds, and `second' or `sec' worth one second.  An `s' suffix on
  948. these units is accepted and ignored.
  949.  
  950.    The unit of time may be preceded by a multiplier, given as an
  951. optionally signed number.  Unsigned numbers are taken as positively
  952. signed.  No number at all implies 1 for a multiplier.  Following a
  953. relative item by the string `ago' is equivalent to preceding the unit
  954. by a multiplicator with value -1.
  955.  
  956.    The string `tomorrow' is worth one day in the future (equivalent to
  957. `day'), the string `yesterday' is worth one day in the past (equivalent
  958. to `day ago').
  959.  
  960.    The strings `now' or `today' are relative items corresponding to
  961. zero-valued time displacement, these strings come from the fact a
  962. zero-valued time displacement represents the current time when not
  963. otherwise change by previous items.  They may be used to stress other
  964. items, like in `12:00 today'.  The string `this' also has the meaning
  965. of a zero-valued time displacement, but is preferred in date strings
  966. like `this thursday'.
  967.  
  968.    When a relative item makes the resulting date to cross the boundary
  969. between DST and non-DST (or vice-versa), the hour is adjusted according
  970. to the local time.
  971.  
  972. 
  973. File: fileutils.info,  Node: Pure numbers in date strings,  Next: Authors of getdate,  Prev: Relative item in date strings,  Up: Date input formats
  974.  
  975. Pure numbers in date strings
  976. ============================
  977.  
  978.    The precise intepretation of a pure decimal number is dependent of
  979. the context in the date string.
  980.  
  981.    If the decimal number is of the form YYYYMMDD and no other calendar
  982. date item (*note Calendar date item::.) appears before it in the date
  983. string, then YYYY is read as the year, MM as the month number and DD as
  984. the day of the month, for the specified calendar date.
  985.  
  986.    If the decimal number is of the form HHMM and no other time of day
  987. item appears before it in the date string, then HH is read as the hour
  988. of the day and MM as the minute of the hour, for the specified time of
  989. the day.  MM can also be omitted.
  990.  
  991.    If both a calendar date and a time of day appear to the left of a
  992. number in the date string, but no relative item, then the number
  993. overrides the year.
  994.  
  995. 
  996. File: fileutils.info,  Node: Authors of getdate,  Prev: Pure numbers in date strings,  Up: Date input formats
  997.  
  998. Authors of `getdate'
  999. ====================
  1000.  
  1001.    `getdate' was originally implemented by Steven M. Bellovin
  1002. (`smb@research.att.com') while at the University of North Carolina at
  1003. Chapel Hill.  The code was later tweaked by a couple of people on
  1004. Usenet, then completely overhauled by Rich $alz (`rsalz@bbn.com') and
  1005. Jim Berets (`jberets@bbn.com') in August, 1990.  Various revisions for
  1006. the GNU system were made by David MacKenzie, Jim Meyering, and others.
  1007.  
  1008.    This chapter was originally produced by Franc,ois Pinard
  1009. (`pinard@iro.umontreal.ca') from the `getdate.y' source code, and then
  1010. edited by K. Berry (`kb@cs.umb.edu').
  1011.  
  1012. 
  1013. File: fileutils.info,  Node: Directory listing,  Next: Basic operations,  Prev: Date input formats,  Up: Top
  1014.  
  1015. Directory listing
  1016. *****************
  1017.  
  1018.    This chapter describes the `ls' command and its variants `dir' and
  1019. `vdir', which list information about files.
  1020.  
  1021. * Menu:
  1022.  
  1023. * ls invocation::               List directory contents.
  1024. * dir invocation::              Briefly ls.
  1025. * vdir invocation::             Verbosely ls.
  1026. * dircolors invocation::        Color setup for ls, etc.
  1027.  
  1028. 
  1029. File: fileutils.info,  Node: ls invocation,  Next: dir invocation,  Up: Directory listing
  1030.  
  1031. `ls': List directory contents
  1032. =============================
  1033.  
  1034.    The `ls' program lists information about files (of any type,
  1035. including directories).  Options and file arguments can be intermixed
  1036. arbitrarily, as usual.
  1037.  
  1038.    For non-option command-line arguments that are directories, by
  1039. default `ls' lists the contents of directories, not recursively, and
  1040. omitting files with names beginning with `.'.  For other non-option
  1041. arguments, by default `ls' lists just the file name.  If no non-option
  1042. arguments are specified, `ls' lists the contents of the current
  1043. directory.
  1044.  
  1045.    By default, the output is sorted alphabetically.  If standard output
  1046. is a terminal, the output is in columns (sorted vertically); otherwise,
  1047. they are listed one per line.
  1048.  
  1049.    Because `ls' is such a fundamental program, it has accumulated many
  1050. options over the years.  They are described in the subsections below;
  1051. within each section, options are listed alphabetically (ignoring case).
  1052. The division of options into the subsections is not absolute, since some
  1053. options affect more than one aspect of `ls''s operation.
  1054.  
  1055.    The `-g' option is accepted but ignored, for compatibility with
  1056. Unix.  Also see *Note Common options::.
  1057.  
  1058. * Menu:
  1059.  
  1060. * Which files are listed::
  1061. * What information is listed::
  1062. * Sorting the output::
  1063. * General output formatting::
  1064. * Formatting the file names::
  1065.  
  1066. 
  1067. File: fileutils.info,  Node: Which files are listed,  Next: What information is listed,  Up: ls invocation
  1068.  
  1069. Which files are listed
  1070. ----------------------
  1071.  
  1072.    These options determine which files `ls' lists information for.  By
  1073. default, any files and the contents of any directories on the command
  1074. line are shown.
  1075.  
  1076. `-a'
  1077. `--all'
  1078.      List all files in directories, including files that start with `.'.
  1079.  
  1080. `-A'
  1081. `--almost-all'
  1082.      List all files in directories except for `.' and `..'.
  1083.  
  1084. `-B'
  1085. `--ignore-backups'
  1086.      Do not list files that end with `~', unless they are given on the
  1087.      command line.
  1088.  
  1089. `-d'
  1090. `--directory'
  1091.      List just the names of directories, as with other types of files,
  1092.      rather than listing their contents.
  1093.  
  1094. `-I'
  1095. `--ignore'
  1096.      Do not list files whose names match the shell pattern (not regular
  1097.      expression) PATTERN unless they are given on the command line.  As
  1098.      in the shell, an initial `.' in a file name does not match a
  1099.      wildcard at the start of PATTERN.
  1100.  
  1101. `-L'
  1102. `--dereference'
  1103.      In a long listing, show file information (e.g., times and
  1104.      permissions) for the referents of symbolic links rather than for
  1105.      the symbolic links themselves.
  1106.  
  1107. `-R'
  1108. `--recursive'
  1109.      List the contents of all directories recursively.
  1110.  
  1111. 
  1112. File: fileutils.info,  Node: What information is listed,  Next: Sorting the output,  Prev: Which files are listed,  Up: ls invocation
  1113.  
  1114. What information is listed
  1115. --------------------------
  1116.  
  1117.    These options affect the information that `ls' displays.  By
  1118. default, only file names are shown.
  1119.  
  1120. `-D'
  1121. `--dired'
  1122.      With the long listing (`-l') format, print an additional line after
  1123.      the main output:
  1124.  
  1125.           //DIRED// BEG1 END1 BEG2 END2 ...
  1126.  
  1127.      The BEGN and ENDN are unsigned integers which record the byte
  1128.      position of the beginning and end of each file name in the output.
  1129.      This makes it easy for Emacs to find the names, even when they
  1130.      contain unusual characters such as space or newline, without fancy
  1131.      searching.
  1132.  
  1133.      If directories are being listed recursively (`-R'), output a
  1134.      similar line after each subdirectory:
  1135.           //SUBDIRED// BEG1 END1 ...
  1136.  
  1137. `-G'
  1138. `--no-group'
  1139.      Inhibit display of group information in a long format directory
  1140.      listing.  (This is the default in some non-GNU versions of `ls',
  1141.      so we provide this option for compatibility.)
  1142.  
  1143. `-i'
  1144. `--inode'
  1145.      Print the inode number (also called the file serial number and
  1146.      index number) of each file to the left of the file name.  (This
  1147.      number uniquely identifies each file within a particular
  1148.      filesystem.)
  1149.  
  1150. `-l'
  1151. `--format=long'
  1152. `--format=verbose'
  1153.      In addition to the name of each file, print the file type,
  1154.      permissions, number of hard links, owner name, group name, size in
  1155.      bytes, and timestamp (by default, the modification time).  For
  1156.      files with a time more than six months old or more than one hour
  1157.      into the future, the timestamp contains the year instead of the
  1158.      time of day.
  1159.  
  1160.      For each directory that is listed, preface the files with a line
  1161.      `total BLOCKS', where BLOCKS is the total disk space used by all
  1162.      files in that directory.  By default, 1024-byte blocks are used;
  1163.      if the environment variable `POSIXLY_CORRECT' is set, 512-byte
  1164.      blocks are used (unless the `-k' option is given).  The BLOCKS
  1165.      computed counts each hard link separately; this is arguably a
  1166.      deficiency.
  1167.  
  1168.      The permissions listed are similar to symbolic mode specifications
  1169.      (*note Symbolic Modes::.).  But `ls' combines multiple bits into
  1170.      the third character of each set of permissions as follows:
  1171.     `s'
  1172.           If the setuid or setgid bit and the corresponding executable
  1173.           bit are both set.
  1174.  
  1175.     `S'
  1176.           If the setuid or setgid bit is set but the corresponding
  1177.           executable bit is not set.
  1178.  
  1179.     `t'
  1180.           If the sticky bit and the other-executable bit are both set.
  1181.  
  1182.     `T'
  1183.           If the sticky bit is set but the other-executable bit is not
  1184.           set.
  1185.  
  1186.     `x'
  1187.           If the executable bit is set and none of the above apply.
  1188.  
  1189.     `-'
  1190.           Otherwise.
  1191.  
  1192. `-o'
  1193.      Produce long format directory listings, but don't display group
  1194.      information.  It is equivalent to using `--format=long' with
  1195.      `--no-group' .  This option is provided for compatibility with
  1196.      other versions of `ls'.
  1197.  
  1198. `-s'
  1199. `--size'
  1200.      Print the size of each file in 1024-byte blocks to the left of the
  1201.      file name.  If the environment variable `POSIXLY_CORRECT' is set,
  1202.      512-byte blocks are used instead, unless the `-k' option is given
  1203.      (*note General output formatting::.).
  1204.  
  1205.      For files that are NFS-mounted from an HP-UX system to a BSD
  1206.      system, this option reports sizes that are half the correct
  1207.      values.  On HP-UX systems, it reports sizes that are twice the
  1208.      correct values for files that are NFS-mounted from BSD systems.
  1209.      This is due to a flaw in HP-UX; it also affects the HP-UX `ls'
  1210.      program.
  1211.  
  1212. 
  1213. File: fileutils.info,  Node: Sorting the output,  Next: General output formatting,  Prev: What information is listed,  Up: ls invocation
  1214.  
  1215. Sorting the output
  1216. ------------------
  1217.  
  1218.    These options change the order in which `ls' sorts the information
  1219. it outputs.  By default, sorting is done by character code (e.g., ASCII
  1220. order).
  1221.  
  1222. `-c'
  1223. `--time=ctime'
  1224. `--time=status'
  1225.      Sort according to the status change time (the `ctime' in the
  1226.      inode).  If the long listing format (`-l') is being used, print the
  1227.      status change time instead of the modification time.
  1228.  
  1229. `-f'
  1230.      Primarily, like `-U'--do not sort; list the files in whatever
  1231.      order they are stored in the directory.  But also enable `-a' (list
  1232.      all files) and disable `-l', `--color', and `-s' (if they were
  1233.      specified before the `-f').
  1234.  
  1235. `-r'
  1236. `--reverse'
  1237.      Reverse whatever the sorting method is--e.g., list files in reverse
  1238.      alphabetical order, youngest first, smallest first, or whatever.
  1239.  
  1240. `-S'
  1241. `--sort=size'
  1242.      Sort by file size, largest first.
  1243.  
  1244. `-t'
  1245. `--sort=time'
  1246.      Sort by modification time (the `mtime' in the inode), newest first.
  1247.  
  1248. `-u'
  1249. `--time=atime'
  1250. `--time=access'
  1251. `--time=use'
  1252.      Sort by access time (the `atime' in the inode).  If the long
  1253.      listing format is being used, print the last access time.
  1254.  
  1255. `-U'
  1256. `--sort=none'
  1257.      Do not sort; list the files in whatever order they are stored in
  1258.      the directory.  (Do not do any of the other unrelated things that
  1259.      `-f' does.)  This is especially useful when listing very large
  1260.      directories, since not doing any sorting can be noticeably faster.
  1261.  
  1262. `-X'
  1263. `--sort=extension'
  1264.      Sort directory contents alphabetically by file extension
  1265.      (characters after the last `.'); files with no extension are
  1266.      sorted first.
  1267.  
  1268. 
  1269. File: fileutils.info,  Node: General output formatting,  Next: Formatting the file names,  Prev: Sorting the output,  Up: ls invocation
  1270.  
  1271. General output formatting
  1272. -------------------------
  1273.  
  1274.    These options affect the appearance of the overall output.
  1275.  
  1276. `-1'
  1277. `--format=single-column'
  1278.      List one file per line.  This is the default for `ls' when standard
  1279.      output is not a terminal.
  1280.  
  1281. `-C'
  1282. `--format=vertical'
  1283.      List files in columns, sorted vertically.  This is the default for
  1284.      `ls' if standard output is a terminal.  It is always the default
  1285.      for the `dir' and `d' programs.
  1286.  
  1287. `--color [=WHEN]'
  1288.      Specify whether to use color for distinguishing file types.  WHEN
  1289.      may be omitted, or one of:
  1290.         * none Do not use color at all.  This is the default.
  1291.  
  1292.         * auto Only use color if standard output is a terminal.
  1293.  
  1294.         * always Always use color.  Specifying `--color' and no WHEN is
  1295.      equivalent to `--color=always'.
  1296.  
  1297. `-F'
  1298. `--classify'
  1299.      Append a character to each file name indicating the file type.
  1300.      Also, for regular files that are executable, append `*'.  The file
  1301.      type indicators are `/' for directories, `@' for symbolic links,
  1302.      `|' for FIFOs, `=' for sockets, and nothing for regular files.
  1303.  
  1304. `--full-time'
  1305.      List times in full, rather than using the standard abbreviation
  1306.      heuristics.  The format is the same as `date''s default; it's not
  1307.      possible to change this, but you can extract out the date string
  1308.      with `cut' and then pass the result to `date -d'.  *Note `date'
  1309.      invocation: (sh-utils)date invocation.
  1310.  
  1311.      This is most useful because the time output includes the seconds.
  1312.      (Unix filesystems store file timestamps only to the nearest
  1313.      second, so this option shows all the information there is.)  For
  1314.      example, this can help when you have a Makefile that is not
  1315.      regenerating files properly.
  1316.  
  1317. `-k'
  1318. `--kilobytes'
  1319.      If file sizes are being listed, print them in kilobytes.  This
  1320.      overrides the environment variable `POSIXLY_CORRECT'.
  1321.  
  1322. `-m'
  1323. `--format=commas'
  1324.      List files horizontally, with as many as will fit on each line,
  1325.      separated by `, ' (a comma and a space).
  1326.  
  1327. `-n'
  1328. `--numeric-uid-gid'
  1329.      List the numeric UID and GID instead of the names.
  1330.  
  1331. `-p'
  1332.      Append a character to each file name indicating the file type.
  1333.      This is like `-F', except that executables are not marked.
  1334.  
  1335. `-x FORMAT'
  1336. `--format=across'
  1337. `--format=horizontal'
  1338.      List the files in columns, sorted horizontally.
  1339.  
  1340. `-T COLS'
  1341. `--tabsize=COLS'
  1342.      Assume that each tabstop is COLS columns wide.  The default is 8.
  1343.      `ls' uses tabs where possible in the output, for efficiency.  If
  1344.      COLS is zero, do not use tabs at all.
  1345.  
  1346. `-w'
  1347. `--width=COLS'
  1348.      Assume the screen is COLS columns wide.  The default is taken from
  1349.      the terminal settings if possible; otherwise the environment
  1350.      variable `COLUMNS' is used if it is set; otherwise the default is
  1351.      80.
  1352.  
  1353. 
  1354. File: fileutils.info,  Node: Formatting the file names,  Prev: General output formatting,  Up: ls invocation
  1355.  
  1356. Formatting the file names
  1357. -------------------------
  1358.  
  1359.    These options change how file names themselves are printed.
  1360.  
  1361. `-b'
  1362. `--escape'
  1363.      Quote nongraphic characters in file names using alphabetic and
  1364.      octal backslash sequences like those used in C.
  1365.  
  1366. `-N'
  1367. `--literal'
  1368.      Do not quote file names.
  1369.  
  1370. `-q'
  1371. `--hide-control-chars'
  1372.      Print question marks instead of nongraphic characters in file
  1373.      names.  This is the default.
  1374.  
  1375. `-Q'
  1376. `--quote-name'
  1377.      Enclose file names in double quotes and quote nongraphic
  1378.      characters as in C.
  1379.  
  1380. 
  1381. File: fileutils.info,  Node: dir invocation,  Next: vdir invocation,  Prev: ls invocation,  Up: Directory listing
  1382.  
  1383. `dir': Briefly list directory contents
  1384. ======================================
  1385.  
  1386.    `dir' (also installed as `d') is equivalent to `ls -C'; that is,
  1387. files are by default listed in columns, sorted vertically.
  1388.  
  1389.    *Note `ls': ls invocation.
  1390.  
  1391. 
  1392. File: fileutils.info,  Node: vdir invocation,  Next: dircolors invocation,  Prev: dir invocation,  Up: Directory listing
  1393.  
  1394. `vdir': Verbosely list directory contents
  1395. =========================================
  1396.  
  1397.    `vdir' (also installed as `v')is equivalent to `ls -l'; that is,
  1398. files are by default listed in long format.
  1399.  
  1400. 
  1401. File: fileutils.info,  Node: dircolors invocation,  Prev: vdir invocation,  Up: Directory listing
  1402.  
  1403. `dircolors': Color setup for `ls'
  1404. =================================
  1405.  
  1406.    `dircolors' outputs a sequence of shell commands to set up the
  1407. terminal for color output from `ls' (and `dir', etc.).  Typical usage:
  1408.  
  1409.      eval `dircolors [OPTION]... [FILE]`
  1410.  
  1411.    If FILE is specified, `dircolors' reads it to determine which colors
  1412. to use for which file types and extensions.  Otherwise, a precompiled
  1413. database is used.  For details on the format of these files, run
  1414. `dircolors --print-database'.
  1415.  
  1416.    The output is a shell command to set the `LS_COLORS' environment
  1417. variable.  You can specify the shell syntax to use on the command line,
  1418. or `dircolors' will guess it from the value of the `SHELL' environment
  1419. variable.
  1420.  
  1421.    The program accepts the following options.  Also see *Note Common
  1422. options::.
  1423.  
  1424. `-b'
  1425. `--sh'
  1426. `--bourne-shell'
  1427.      Output Bourne shell commands.  This is the default if the `SHELL'
  1428.      environment variable is set and does not end with `csh' or `tcsh'.
  1429.  
  1430. `-c'
  1431. `--csh'
  1432. `--c-shell'
  1433.      Output C shell commands.  This is the default if `SHELL' ends with
  1434.      `csh' or `tcsh'.
  1435.  
  1436. `-p'
  1437. `--print-database'
  1438.      Print the (compiled-in) default color configuration database.  This
  1439.      output is itself a valid configuration file, and is fairly
  1440.      descriptive of the possibilities.
  1441.  
  1442. 
  1443. File: fileutils.info,  Node: Basic operations,  Next: Special file types,  Prev: Directory listing,  Up: Top
  1444.  
  1445. Basic operations
  1446. ****************
  1447.  
  1448.    This chapter describes the commands for basic file manipulation:
  1449. copying, moving (renaming), and deleting (removing).
  1450.  
  1451. * Menu:
  1452.  
  1453. * cp invocation::               Copy files.
  1454. * dd invocation::               Convert and copy a file.
  1455. * install invocation::          Copy files and set attributes.
  1456. * mv invocation::               Move (rename) files.
  1457. * rm invocation::               Remove files or directories.
  1458.  
  1459. 
  1460. File: fileutils.info,  Node: cp invocation,  Next: dd invocation,  Up: Basic operations
  1461.  
  1462. `cp': Copy files and directories
  1463. ================================
  1464.  
  1465.    `cp' copies files (or, optionally, directories).  The copy is
  1466. completely independent of the original.  You can either copy one file to
  1467. another, or copy arbitrarily many files to a destination directory.
  1468. Synopsis:
  1469.  
  1470.      cp [OPTION]... SOURCE DEST
  1471.      cp [OPTION]... SOURCE... DIRECTORY
  1472.  
  1473.    If the last argument names an existing directory, `cp' copies each
  1474. SOURCE file into that directory (retaining the same name).  Otherwise,
  1475. if only two files are given, it copies the first onto the second.  It
  1476. is an error if the last argument is not a directory and more than two
  1477. non-option arguments are given.
  1478.  
  1479.    Generally, files are written just as they are read.  For exceptions,
  1480. see the `--sparse' option below.
  1481.  
  1482.    By default, `cp' does not copy directories (see `-r' below).
  1483.  
  1484.    `cp' generally refuses to copy a file onto itself, with the
  1485. following exception: if `--force --backup' is specified with SOURCE and
  1486. DEST identical, and referring to a regular file, `cp' will make a
  1487. backup file, either regular or numbered, as specified in the usual ways
  1488. (*note Backup options::.).  This is useful when you simply want to make
  1489. a backup of an existing file before changing it.
  1490.  
  1491.    The program accepts the following options.  Also see *Note Common
  1492. options::.
  1493.  
  1494. `-a'
  1495. `--archive'
  1496.      Preserve as much as possible of the structure and attributes of the
  1497.      original files in the copy (but do not preserve directory
  1498.      structure).  Equivalent to `-dpR'.
  1499.  
  1500. `-b'
  1501. `--backup'
  1502.      Make backups of files that are about to be overwritten or removed.
  1503.      *Note Backup options::.
  1504.  
  1505. `-d'
  1506. `--no-dereference'
  1507.      Copy symbolic links as symbolic links rather than copying the
  1508.      files that they point to, and preserve hard links between source
  1509.      files in the copies.
  1510.  
  1511. `-f'
  1512. `--force'
  1513.      Remove existing destination files.
  1514.  
  1515. `-i'
  1516. `--interactive'
  1517.      Prompt whether to overwrite existing regular destination files.
  1518.  
  1519. `-l'
  1520. `--link'
  1521.      Make hard links instead of copies of non-directories.
  1522.  
  1523. `-p'
  1524. `--preserve'
  1525.      Preserve the original files' owner, group, permissions, and
  1526.      timestamps.
  1527.  
  1528. `-P'
  1529. `--parents'
  1530.      Form the name of each destination file by appending to the target
  1531.      directory a slash and the specified name of the source file.  The
  1532.      last argument given to `cp' must be the name of an existing
  1533.      directory.  For example, the command:
  1534.  
  1535.           cp --parents a/b/c existing_dir
  1536.  
  1537.      copies the file `a/b/c' to `existing_dir/a/b/c', creating any
  1538.      missing intermediate directories.
  1539.  
  1540. `-r'
  1541.      Copy directories recursively, copying any non-directories and
  1542.      non-symbolic links (that is, FIFOs and special files) as if they
  1543.      were regular files.  This means trying to read the data in each
  1544.      source file and writing it to the destination.  Thus, with this
  1545.      option, `cp' may well hang indefinitely reading a FIFO, unless
  1546.      something else happens to be writing it.
  1547.  
  1548. `-R'
  1549. `--recursive'
  1550.      Copy directories recursively, preserving non-directories (see `-r'
  1551.      just above).
  1552.  
  1553. `--sparse=WHEN'
  1554.      A "sparse file" contains "holes"--a sequence of zero bytes that
  1555.      does not occupy any physical disk blocks; the `read' system call
  1556.      reads these as zeroes.  This can both save considerable disk space
  1557.      and increase speed, since many binary files contain lots of
  1558.      consecutive zero bytes.  By default, `cp' detects holes in input
  1559.      source files via a crude heuristic and makes the corresponding
  1560.      output file sparse as well.
  1561.  
  1562.      The WHEN value can be one of the following:
  1563.     `auto'
  1564.           The default behavior: the output file is sparse if the input
  1565.           file is sparse.
  1566.  
  1567.     `always'
  1568.           Always make the output file sparse.  This is useful when the
  1569.           input file resides on a filesystem that does not support
  1570.           sparse files (the most notable example is `efs' filesystems
  1571.           in SGI IRIX 5.3 and earlier), but the output file is on
  1572.           another type of filesystem.
  1573.  
  1574.     `never'
  1575.           Never make the output file sparse.  If you find an
  1576.           application for this option, let us know.
  1577.  
  1578. `-s'
  1579. `--symbolic-link'
  1580.      Make symbolic links instead of copies of non-directories.  All
  1581.      source file names must be absolute (starting with `/') unless the
  1582.      destination files are in the current directory.  This option merely
  1583.      results in an error message on systems that do not support
  1584.      symbolic links.
  1585.  
  1586. `-S SUFFIX'
  1587. `--suffix=SUFFIX'
  1588.      Append SUFFIX to each backup file made with `-b'.  *Note Backup
  1589.      options::.
  1590.  
  1591. `-u'
  1592. `--update'
  1593.      Do not copy a nondirectory that has an existing destination with
  1594.      the same or newer modification time.
  1595.  
  1596. `-v'
  1597. `--verbose'
  1598.      Print the name of each file before copying it.
  1599.  
  1600. `-V METHOD'
  1601. `--version-control=METHOD'
  1602.      Change the type of backups made with `-b'.  The METHOD argument
  1603.      can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or
  1604.      `simple').  *Note Backup options::.
  1605.  
  1606. `-x'
  1607. `--one-file-system'
  1608.      Skip subdirectories that are on different filesystems from the one
  1609.      that the copy started on.
  1610.  
  1611. 
  1612. File: fileutils.info,  Node: dd invocation,  Next: install invocation,  Prev: cp invocation,  Up: Basic operations
  1613.  
  1614. `dd': Convert and copy a file
  1615. =============================
  1616.  
  1617.    `dd' copies a file (from standard input to standard output, by
  1618. default) with a changeable I/O blocksize, while optionally performing
  1619. conversions on it.  Synopsis:
  1620.  
  1621.      dd [OPTION]...
  1622.  
  1623.    The program accepts the following options.  Also see *Note Common
  1624. options::.
  1625.  
  1626.    The numeric-valued options below (BYTES and BLOCKS) can be followed
  1627. by a multiplier: `b'=512, `c'=1, `k'=1024, `w'=2, `xM'=M.
  1628.  
  1629. `if=FILE'
  1630.      Read from FILE instead of standard input.
  1631.  
  1632. `of=FILE'
  1633.      Write to FILE instead of standard output.  Unless `conv=notrunc'
  1634.      is given, `dd' truncates FILE to zero bytes (or the size specified
  1635.      with `seek=').
  1636.  
  1637. `ibs=BYTES'
  1638.      Read BYTES bytes at a time.
  1639.  
  1640. `obs=BYTES'
  1641.      Write BYTES bytes at a time.
  1642.  
  1643. `bs=BYTES'
  1644.      Both read and write BYTES bytes at a time.  This overrides `ibs'
  1645.      and `obs'.
  1646.  
  1647. `cbs=BYTES'
  1648.      Convert BYTES bytes at a time.
  1649.  
  1650. `skip=BLOCKS'
  1651.      Skip BLOCKS `ibs'-byte blocks in the input file before copying.
  1652.  
  1653. `seek=BLOCKS'
  1654.      Skip BLOCKS `obs'-byte blocks in the output file before copying.
  1655.  
  1656. `count=BLOCKS'
  1657.      Copy BLOCKS `obs'-byte blocks from the input file, instead of
  1658.      everything until the end of the file.
  1659.  
  1660. `conv=CONVERSION[,CONVERSION]...'
  1661.      Convert the file as specified by the CONVERSION argument(s).  (No
  1662.      spaces around any comma(s).)
  1663.  
  1664.      Conversions:
  1665.  
  1666.     `ascii'
  1667.           Convert EBCDIC to ASCII.
  1668.  
  1669.     `ebcdic'
  1670.           Convert ASCII to EBCDIC.
  1671.  
  1672.     `ibm'
  1673.           Convert ASCII to alternate EBCDIC.
  1674.  
  1675.     `block'
  1676.           For each line in the input, output `cbs' bytes, replacing the
  1677.           input newline with a space and padding with spaces as
  1678.           necessary.
  1679.  
  1680.     `unblock'
  1681.           Replace trailing spaces in each `cbs'-sized input block with a
  1682.           newline.
  1683.  
  1684.     `lcase'
  1685.           Change uppercase letters to lowercase.
  1686.  
  1687.     `ucase'
  1688.           Change lowercase letters to uppercase.
  1689.  
  1690.     `swab'
  1691.           Swap every pair of input bytes.  GNU `dd', unlike others,
  1692.           works when an odd number of bytes are read--the last byte is
  1693.           simply copied (since there is nothing to swap it with).
  1694.  
  1695.     `noerror'
  1696.           Continue after read errors.
  1697.  
  1698.     `notrunc'
  1699.           Do not truncate the output file.
  1700.  
  1701.     `sync'
  1702.           Pad every input block to size of `ibs' with trailing zero
  1703.           bytes.
  1704.  
  1705. 
  1706. File: fileutils.info,  Node: install invocation,  Next: mv invocation,  Prev: dd invocation,  Up: Basic operations
  1707.  
  1708. `install': Copy files and set attributes
  1709. ========================================
  1710.  
  1711.    `install' copies files while setting their permission modes and, if
  1712. possible, their owner and group.  Synopses:
  1713.  
  1714.      install [OPTION]... SOURCE DEST
  1715.      install [OPTION]... SOURCE... DIRECTORY
  1716.      install -d [OPTION]... DIRECTORY...
  1717.  
  1718.    In the first of these, the SOURCE file is copied to the DEST target
  1719. file.  In the second, each of the SOURCE files are copied to the
  1720. destination DIRECTORY.  In the last, each DIRECTORY (and any missing
  1721. parent directories) is created.
  1722.  
  1723.    `install' is similar to `cp', but allows you to control the
  1724. attributes of destination files.  It is typically used in Makefiles to
  1725. copy programs into their destination directories.  It refuses to copy
  1726. files onto themselves.
  1727.  
  1728.    The program accepts the following options.  Also see *Note Common
  1729. options::.
  1730.  
  1731. `-b'
  1732. `--backup'
  1733.      Make backups of files that are about to be overwritten or removed.
  1734.      *Note Backup options::.
  1735.  
  1736. `-c'
  1737.      Ignored; for compatibility with old Unix versions of `install'.
  1738.  
  1739. `-d'
  1740. `--directory'
  1741.      Create each given directory and any missing parent directories,
  1742.      setting the owner, group and mode as given on the command line or
  1743.      to the defaults.  It also gives any parent directories it creates
  1744.      those attributes.  (This is different from the SunOS 4.x
  1745.      `install', which gives directories that it creates the default
  1746.      attributes.)
  1747.  
  1748. `-g GROUP'
  1749. `--group=GROUP'
  1750.      Set the group ownership of installed files or directories to
  1751.      GROUP. The default is the process's current group.  GROUP may be
  1752.      either a group name or a numeric group id.
  1753.  
  1754. `-m MODE'
  1755. `--mode=MODE'
  1756.      Set the permissions for the installed file or directory to MODE,
  1757.      which can be either an octal number, or a symbolic mode as in
  1758.      `chmod', with 0 as the point of departure (*note File
  1759.      permissions::.).  The default mode is 0755--read, write, and
  1760.      execute for the owner, and read and execute for group and other.
  1761.  
  1762. `-o OWNER'
  1763. `--owner=OWNER'
  1764.      If `install' has appropriate privileges (is run as root), set the
  1765.      ownership of installed files or directories to OWNER. The default
  1766.      is `root'.  OWNER may be either a user name or a numeric user ID.
  1767.  
  1768. `-s'
  1769. `--strip'
  1770.      Strip the symbol tables from installed binary executables.
  1771.  
  1772. `-S SUFFIX'
  1773. `--suffix=SUFFIX'
  1774.      Append SUFFIX to each backup file made with `-b'.  *Note Backup
  1775.      options::.
  1776.  
  1777. `-V METHOD'
  1778. `--version-control=METHOD'
  1779.      Change the type of backups made with `-b'.  The METHOD argument
  1780.      can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or
  1781.      `simple').  *Note Backup options::.
  1782.  
  1783. 
  1784. File: fileutils.info,  Node: mv invocation,  Next: rm invocation,  Prev: install invocation,  Up: Basic operations
  1785.  
  1786. `mv': Move (rename) files
  1787. =========================
  1788.  
  1789.    `mv' moves or renames files (or directories).  Synopsis:
  1790.  
  1791.      mv [OPTION]... SOURCE DEST
  1792.      mv [OPTION]... SOURCE... DIRECTORY
  1793.  
  1794.    If the last argument names an existing directory, `mv' moves each
  1795. other given file into a file with the same name in that directory.
  1796. Otherwise, if only two files are given, it renames the first as the
  1797. second.  It is an error if the last argument is not a directory and
  1798. more than two files are given.
  1799.  
  1800.    `mv' can move only regular files across filesystems.
  1801.  
  1802.    If a destination file exists but is normally unwritable, standard
  1803. input is a terminal, and the `-f' or `--force' option is not given,
  1804. `mv' prompts the user for whether to replace the file.  (You might own
  1805. the file, or have write permission on its directory.)  If the response
  1806. does not begin with `y' or `Y', the file is skipped.
  1807.  
  1808.    The program accepts the following options.  Also see *Note Common
  1809. options::.
  1810.  
  1811. `-b'
  1812. `--backup'
  1813.      Make backups of files that are about to be overwritten or removed.
  1814.      *Note Backup options::.
  1815.  
  1816. `-f'
  1817. `--force'
  1818.      Remove existing destination files and never prompt the user.
  1819.  
  1820. `-i'
  1821. `--interactive'
  1822.      Prompt whether to overwrite each existing destination file,
  1823.      regardless of its permissions.  If the response does not begin
  1824.      with `y' or `Y', the file is skipped.
  1825.  
  1826. `-u'
  1827. `--update'
  1828.      Do not move a nondirectory that has an existing destination with
  1829.      the same or newer modification time.
  1830.  
  1831. `-v'
  1832. `--verbose'
  1833.      Print the name of each file before moving it.
  1834.  
  1835. `-S SUFFIX'
  1836. `--suffix=SUFFIX'
  1837.      Append SUFFIX to each backup file made with `-b'.  *Note Backup
  1838.      options::.
  1839.  
  1840. `-V METHOD'
  1841. `--version-control=METHOD'
  1842.      Change the type of backups made with `-b'.  The METHOD argument
  1843.      can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or
  1844.      `simple').  *Note Backup options::.
  1845.  
  1846. 
  1847. File: fileutils.info,  Node: rm invocation,  Prev: mv invocation,  Up: Basic operations
  1848.  
  1849. `rm': Remove files or directories
  1850. =================================
  1851.  
  1852.    `rm' removes each given FILE.  By default, it does not remove
  1853. directories.  Synopsis:
  1854.  
  1855.      rm [OPTION]... [FILE]...
  1856.  
  1857.    If a file is unwritable, standard input is a terminal, and the `-f'
  1858. or `--force' option is not given, or the `-i' or `--interactive' option
  1859. *is* given, `rm' prompts the user for whether to remove the file.  If
  1860. the response does not begin with `y' or `Y', the file is skipped.
  1861.  
  1862.    The program accepts the following options.  Also see *Note Common
  1863. options::.
  1864.  
  1865. `-d'
  1866. `--directory'
  1867.      Remove directories with `unlink' instead of `rmdir', and don't
  1868.      require a directory to be empty before trying to unlink it.  Only
  1869.      works if you have appropriate privileges.  Because unlinking a
  1870.      directory causes any files in the deleted directory to become
  1871.      unreferenced, it is wise to `fsck' the filesystem after doing this.
  1872.  
  1873. `-f'
  1874. `--force'
  1875.      Ignore nonexistent files and never prompt the user.
  1876.  
  1877. `-i'
  1878. `--interactive'
  1879.      Prompt whether to remove each file.  If the response does not begin
  1880.      with `y' or `Y', the file is skipped.
  1881.  
  1882. `-r'
  1883. `-R'
  1884. `--recursive'
  1885.      Remove the contents of directories recursively.
  1886.  
  1887. `-v'
  1888. `--verbose'
  1889.      Print the name of each file before removing it.
  1890.  
  1891.    One common question is how to remove files whose names being with a
  1892. `-'.  GNU `rm', like every program that uses the `getopt' function to
  1893. parse its arguments, lets you use the `--' option to indicate that all
  1894. following arguments are non-options.  To remove a file called `-f' in
  1895. the current directory, you could type either:
  1896.  
  1897.      rm -- -f
  1898.  
  1899. or:
  1900.  
  1901.      rm ./-f
  1902.  
  1903.    The Unix `rm' program's use of a single `-' for this purpose
  1904. predates the development of the getopt standard syntax.
  1905.  
  1906. 
  1907. File: fileutils.info,  Node: Special file types,  Next: Changing file attributes,  Prev: Basic operations,  Up: Top
  1908.  
  1909. Special file types
  1910. ******************
  1911.  
  1912.    This chapter describes commands which create special types of files
  1913. (and `rmdir', which removes directories, one special file type).
  1914.  
  1915.    Although Unix-like operating systems have markedly fewer special file
  1916. types than others, not *everything* can be treated only as the
  1917. undifferentiated byte stream of "normal files".  For example, when a
  1918. file is created or removed, the system must record this information,
  1919. which it does in a "directory"--a special type of file.  Although you
  1920. can read directories as normal files, if you're curious, in order for
  1921. the system to do its job it must impose a structure, a certain order,
  1922. on the bytes of the file.  Thus it is a "special" type of file.
  1923.  
  1924.    Besides directories, other special file types include named pipes
  1925. (FIFOs), symbolic links, sockets, and so-called "special files".
  1926.  
  1927. * Menu:
  1928.  
  1929. * ln invocation::               Make links between files.
  1930. * mkdir invocation::            Make directories.
  1931. * mkfifo invocation::           Make FIFOs (named pipes).
  1932. * mknod invocation::            Make block or character special files.
  1933. * rmdir invocation::            Remove empty directories.
  1934.  
  1935. 
  1936. File: fileutils.info,  Node: ln invocation,  Next: mkdir invocation,  Up: Special file types
  1937.  
  1938. `ln': Make links between files
  1939. ==============================
  1940.  
  1941.    `ln' makes links between files.  By default, it makes hard links;
  1942. with the `-s' option, it makes symbolic (or "soft") links.  Synopses:
  1943.  
  1944.      ln [OPTION]... SOURCE [DEST]
  1945.      ln [OPTION]... SOURCE... DIRECTORY
  1946.  
  1947.    If the last argument names an existing directory, `ln' links each
  1948. SOURCE file into a file with the same name in that directory.  (But see
  1949. the description of the `--no-dereference' option below.) If only one
  1950. file is given, it links that file into the current directory.
  1951. Otherwise, if only two files are given, it links the first onto the
  1952. second.  It is an error if the last argument is not a directory and more
  1953. than two files are given.  By default, it does not remove existing
  1954. files.
  1955.  
  1956.    A "hard link" is another name for an existing file; the link and the
  1957. original are indistinguishable.  (Technically speaking, they share the
  1958. same inode, and the inode contains all the information about a
  1959. file--indeed, it is not incorrect to say that the inode *is* the file.)
  1960. On all existing implementations, you cannot make a hard links to
  1961. directories, and hard links cannot cross filesystem boundaries.  (These
  1962. restrictions are not mandated by POSIX, however.)
  1963.  
  1964.    "Symbolic links" ("symlinks" for short), on the other hand, are a
  1965. special file type (which not all kernels support; in particular, system
  1966. V release 3 (and older) systems lack symlinks) in which the link file
  1967. actually refers to a different file, by name.  When most operations
  1968. (opening, reading, writing, and so on) are passed the symbolic link
  1969. file, the kernel automatically "dereferences" the link and operates on
  1970. the target of the link.  But some operations (e.g., removing) work on
  1971. the link file itself, rather than on its target.  *Note Symbolic Links:
  1972. (library)Symbolic Links.
  1973.  
  1974.    The program accepts the following options.  Also see *Note Common
  1975. options::.
  1976.  
  1977. `-b'
  1978. `--backup'
  1979.      Make backups of files that are about to be overwritten or removed.
  1980.      *Note Backup options::.
  1981.  
  1982. `-d'
  1983. `-F'
  1984. `--directory'
  1985.      Allow the super-user to make hard links to directories.
  1986.  
  1987. `-f'
  1988. `--force'
  1989.      Remove existing destination files.
  1990.  
  1991. `-i'
  1992. `--interactive'
  1993.      Prompt whether to remove existing destination files.
  1994.  
  1995. `-n'
  1996. `--no-dereference'
  1997.      When given an explicit destination that is a symlink to a
  1998.      directory, treat that destination as if it were a normal file.
  1999.  
  2000.      When the destination is an actual directory (not a symlink to one),
  2001.      there is no ambiguity.  The link is created in that directory.
  2002.      But when the specified destination is a symlink to a directory,
  2003.      there are two ways to treat the user's request.  `ln' can treat
  2004.      the destination just as it would a normal directory and create the
  2005.      link in it.  On the other hand, the destination can be viewed as a
  2006.      non-directory--as the symlink itself.  In that case, `ln' must
  2007.      delete or backup that symlink before creating the new link.  The
  2008.      default is to treat a destination that is a symlink to a directory
  2009.      just like a directory.
  2010.  
  2011. `-s'
  2012. `--symbolic'
  2013.      Make symbolic links instead of hard links.  This option merely
  2014.      produces an error message on systems that do not support symbolic
  2015.      links.
  2016.  
  2017. `-v'
  2018. `--verbose'
  2019.      Print the name of each file before linking it.
  2020.  
  2021. `-S SUFFIX'
  2022. `--suffix=SUFFIX'
  2023.      Append SUFFIX to each backup file made with `-b'.  *Note Backup
  2024.      options::.
  2025.  
  2026. `-V METHOD'
  2027. `--version-control=METHOD'
  2028.      Change the type of backups made with `-b'.  The METHOD argument
  2029.      can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or
  2030.      `simple').  *Note Backup options::.
  2031.  
  2032. 
  2033. File: fileutils.info,  Node: mkdir invocation,  Next: mkfifo invocation,  Prev: ln invocation,  Up: Special file types
  2034.  
  2035. `mkdir': Make directories
  2036. =========================
  2037.  
  2038.    `mkdir' creates directories with the specified names.  Synopsis:
  2039.  
  2040.      mkdir [OPTION]... NAME...
  2041.  
  2042.    It is not an error if a NAME is already a directory; `mkdir' simply
  2043. proceeds.  But if a NAME is an existing file and is anything but a
  2044. directory, `mkdir' complains.
  2045.  
  2046.    The program accepts the following options.  Also see *Note Common
  2047. options::.
  2048.  
  2049. `-m MODE'
  2050. `--mode=MODE'
  2051.      Set the mode of created directories to MODE, which is symbolic as
  2052.      in `chmod' and uses 0777 (read, write and execute allowed for
  2053.      everyone) minus the bits set in the umask for the point of the
  2054.      departure.  *Note File permissions::.
  2055.  
  2056. `-p'
  2057. `--parents'
  2058.      Make any missing parent directories for each argument.  The mode
  2059.      for parent directories is set to the umask modified by `u+wx'.
  2060.      Ignore arguments corresponding to existing directories.
  2061.  
  2062. `--verbose'
  2063.      Print a message for each created directory.  This is most useful
  2064.      with `--parents'.
  2065.  
  2066. 
  2067. File: fileutils.info,  Node: mkfifo invocation,  Next: mknod invocation,  Prev: mkdir invocation,  Up: Special file types
  2068.  
  2069. `mkfifo': Make FIFOs (named pipes)
  2070. ==================================
  2071.  
  2072.    `mkfifo' creates FIFOs (also called "named pipes") with the
  2073. specified names.  Synopsis:
  2074.  
  2075.      mkfifo [OPTION] NAME...
  2076.  
  2077.    A "FIFO" is a special file type that permits independent processes
  2078. to communicate.  One process opens the FIFO file for writing, and
  2079. another for reading, after which data can flow as with the usual
  2080. anonymous pipe in shells or elsewhere.
  2081.  
  2082.    The program accepts the following option.  Also see *Note Common
  2083. options::.
  2084.  
  2085. `-m MODE'
  2086. `--mode=MODE'
  2087.      Set the mode of created FIFOs to MODE, which is symbolic as in
  2088.      `chmod' and uses 0666 (read and write allowed for everyone) minus
  2089.      the bits set in the umask for the point of departure.  *Note File
  2090.      permissions::.
  2091.  
  2092. 
  2093. File: fileutils.info,  Node: mknod invocation,  Next: rmdir invocation,  Prev: mkfifo invocation,  Up: Special file types
  2094.  
  2095. `mknod': Make block or character special files
  2096. ==============================================
  2097.  
  2098.    `mknod' creates a FIFO, character special file, or block special
  2099. file with the specified name.  Synopsis:
  2100.  
  2101.      mknod [OPTION]... NAME TYPE [MAJOR MINOR]
  2102.  
  2103.    Unlike the phrase "special file type" above, the term "special file"
  2104. has a technical meaning on Unix: something that can generate or receive
  2105. data.  Usually this corresponds to a physical piece of hardware, e.g.,
  2106. a printer or a disk.  (These files are typically created at
  2107. system-configuration time.)  The `mknod' command is what creates files
  2108. of this type.  Such devices can be read either a character at a time or
  2109. a "block" (many characters) at a time, hence we say there are "block
  2110. special" files and "character special" files.
  2111.  
  2112.    The arguments after NAME specify the type of file to make:
  2113.  
  2114. `p'
  2115.      for a FIFO
  2116.  
  2117. `b'
  2118.      for a block (buffered) special file
  2119.  
  2120. `c'
  2121.      for a character (buffered) special file
  2122.  
  2123. `u'
  2124.      for a character (unbuffered) special file
  2125.  
  2126.    When making a block or character special file, the major and minor
  2127. device numbers must be given after the file type.
  2128.  
  2129.    The program accepts the following option.  Also see *Note Common
  2130. options::.
  2131.  
  2132. `-m MODE'
  2133. `--mode=MODE'
  2134.      Set the mode of created files to MODE, which is symbolic as in
  2135.      `chmod' and uses 0666 minus the bits set in the umask as the point
  2136.      of departure.  *Note File permissions::.
  2137.  
  2138. 
  2139. File: fileutils.info,  Node: rmdir invocation,  Prev: mknod invocation,  Up: Special file types
  2140.  
  2141. `rmdir': Remove empty directories
  2142. =================================
  2143.  
  2144.    `rmdir' removes empty directories.  Synopsis:
  2145.  
  2146.      rmdir [OPTION]... DIRECTORY...
  2147.  
  2148.    If any DIRECTORY argument does not refer to an existing empty
  2149. directory, it is an error.
  2150.  
  2151.    The program accepts the following option.  Also see *Note Common
  2152. options::.
  2153.  
  2154. `-p'
  2155. `--parents'
  2156.      Remove any parent directories that become empty after an argument
  2157.      DIRECTORY is removed.
  2158.  
  2159.    *Note rm invocation::, for how to remove non-empty directories
  2160. (recursively).
  2161.  
  2162. 
  2163. File: fileutils.info,  Node: Changing file attributes,  Next: Disk usage,  Prev: Special file types,  Up: Top
  2164.  
  2165. Changing file attributes
  2166. ************************
  2167.  
  2168.    A file is not merely its contents, a name, and a file type (*note
  2169. Special file types::.).  A file also has an owner (a userid), a group
  2170. (a group id), permissions (what the owner can do with the file, what
  2171. people in the group can do, and what everyone else can do), various
  2172. timestamps, and other information.  Collectively, we call these a file's
  2173. "attributes".
  2174.  
  2175.    These commands change file attributes.
  2176.  
  2177. * Menu:
  2178.  
  2179. * chown invocation::            Change file owners and groups.
  2180. * chgrp invocation::            Change file groups.
  2181. * chmod invocation::            Change access permissions.
  2182. * touch invocation::            Change file timestamps.
  2183.  
  2184. 
  2185. File: fileutils.info,  Node: chown invocation,  Next: chgrp invocation,  Up: Changing file attributes
  2186.  
  2187. `chown': Change file owner and group
  2188. ====================================
  2189.  
  2190.    `chown' changes the user and/or group ownership of each given file.
  2191. Synopsis:
  2192.  
  2193.      chown [OPTION]... NEW-OWNER FILE...
  2194.  
  2195.    The first non-option argument, NEW-OWNER, specifies the new owner
  2196. and/or group, as follows (with no embedded white space):
  2197.  
  2198.      [OWNER] [ [:.] [GROUP] ]
  2199.  
  2200.    Specifically:
  2201.  
  2202. OWNER
  2203.      If only an OWNER (a user name or numeric user id) is given, that
  2204.      user is made the owner of each given file, and the files' group is
  2205.      not changed.
  2206.  
  2207. OWNER`.'GROUP
  2208. OWNER`:'GROUP
  2209.      If the OWNER is followed by a colon or dot and a GROUP (a group
  2210.      name or numeric group id), with no spaces between them, the group
  2211.      ownership of the files is changed as well (to GROUP).
  2212.  
  2213. OWNER`.'
  2214. OWNER`:'
  2215.      If a colon or dot but no group name follows OWNER, that user is
  2216.      made the owner of the files and the group of the files is changed
  2217.      to OWNER's login group.
  2218.  
  2219. `.'GROUP
  2220. `:'GROUP
  2221.      If the colon or dot and following GROUP are given, but the owner
  2222.      is omitted, only the group of the files is changed; in this case,
  2223.      `chown' performs the same function as `chgrp'.
  2224.  
  2225.    The program accepts the following options.  Also see *Note Common
  2226. options::.
  2227.  
  2228. `-c'
  2229. `--changes'
  2230.      Verbosely describe the action for each FILE whose ownership
  2231.      actually changes.
  2232.  
  2233. `-f'
  2234. `--silent'
  2235. `--quiet'
  2236.      Do not print error messages about files whose ownership cannot be
  2237.      changed.
  2238.  
  2239. `-h'
  2240. `--no-dereference'
  2241.      Act on symbolic links themselves instead of what they point to.
  2242.      Only available if the `lchown' system call is provided.
  2243.  
  2244. `-v'
  2245. `--verbose'
  2246.      Verbosely describe the action (or non-action) taken for every FILE.
  2247.  
  2248. `-R'
  2249. `--recursive'
  2250.      Recursively change ownership of directories and their contents.
  2251.  
  2252. 
  2253. File: fileutils.info,  Node: chgrp invocation,  Next: chmod invocation,  Prev: chown invocation,  Up: Changing file attributes
  2254.  
  2255. `chgrp': Change group ownership
  2256. ===============================
  2257.  
  2258.    `chgrp' changes the group ownership of each given FILE to GROUP,
  2259. which can be either a group name or a numeric group id.  Synopsis:
  2260.  
  2261.      chgrp [OPTION]... GROUP FILE...
  2262.  
  2263.    The program accepts the following options.  Also see *Note Common
  2264. options::.
  2265.  
  2266. `-c'
  2267. `--changes'
  2268.      Verbosely describe the action for each FILE whose group actually
  2269.      changes.
  2270.  
  2271. `-f'
  2272. `--silent'
  2273. `--quiet'
  2274.      Do not print error messages about files whose group cannot be
  2275.      changed.
  2276.  
  2277. `-f'
  2278. `--no-dereference'
  2279.      Act on symbolic links themselves instead of what they point to.
  2280.      Only available if the `lchown' system call is provided.
  2281.  
  2282. `-v'
  2283. `--verbose'
  2284.      Verbosely describe the action or non-action taken for every FILE.
  2285.  
  2286. `-R'
  2287. `--recursive'
  2288.      Recursively change the group ownership of directories and their
  2289.      contents.
  2290.  
  2291. 
  2292. File: fileutils.info,  Node: chmod invocation,  Next: touch invocation,  Prev: chgrp invocation,  Up: Changing file attributes
  2293.  
  2294. `chmod': Change access permissions
  2295. ==================================
  2296.  
  2297.    `chmod' changes the access permissions of the named files.  Synopsis:
  2298.  
  2299.      chmod [OPTION]... MODE FILE...
  2300.  
  2301.    `chmod' never changes the permissions of symbolic links, since the
  2302. `chmod' system call cannot change their permissions.  This is not a
  2303. problem since the permissions of symbolic links are never used.
  2304. However, for each symbolic link listed on the command line, `chmod'
  2305. changes the permissions of the pointed-to file.  In contrast, `chmod'
  2306. ignores symbolic links encountered during recursive directory
  2307. traversals.
  2308.  
  2309.    The first non-option argument, MODE, specifies the new permissions.
  2310. See the section below for details.
  2311.  
  2312.    The program accepts the following options.  Also see *Note Common
  2313. options::.
  2314.  
  2315. `-c'
  2316. `--changes'
  2317.      Verbosely describe the action for each FILE whose permissions
  2318.      actually changes.
  2319.  
  2320. `-f'
  2321. `--silent'
  2322. `--quiet'
  2323.      Do not print error messages about files whose permissions cannot be
  2324.      changed.
  2325.  
  2326. `-v'
  2327. `--verbose'
  2328.      Verbosely describe the action or non-action taken for every FILE.
  2329.  
  2330. `-R'
  2331. `--recursive'
  2332.      Recursively change permissions of directories and their contents.
  2333.  
  2334. 
  2335. File: fileutils.info,  Node: touch invocation,  Prev: chmod invocation,  Up: Changing file attributes
  2336.  
  2337. `touch': Change file timestamps
  2338. ===============================
  2339.  
  2340.    `touch' changes the access and/or modification times of the
  2341. specified files.  Synopsis:
  2342.  
  2343.      touch [OPTION]... FILE...
  2344.  
  2345.    If the first FILE would be a valid argument to the `-t' option and
  2346. no timestamp is given with any of the `-d', `-r', or `-t' options and
  2347. the `--' argument is not given, that argument is interpreted as the
  2348. time for the other files instead of as a file name.
  2349.  
  2350.    Any FILE that does not exist is created empty.
  2351.  
  2352.    If changing both the access and modification times to the current
  2353. time, `touch' can change the timestamps for files that the user running
  2354. it does not own but has write permission for.  Otherwise, the user must
  2355. own the files.
  2356.  
  2357.    The program accepts the following options.  Also see *Note Common
  2358. options::.
  2359.  
  2360. `-a'
  2361. `--time=atime'
  2362. `--time=access'
  2363. `--time=use'
  2364.      Change the access time only.
  2365.  
  2366. `-c'
  2367. `--no-create'
  2368.      Do not create files that do not exist.
  2369.  
  2370. `-d'
  2371. `--date=time'
  2372.      Use TIME instead of the current time.  It can contain month names,
  2373.      timezones, `am' and `pm', etc.  *Note Date input formats::.
  2374.  
  2375. `-f'
  2376.      Ignored; for compatibility with BSD versions of `touch'.
  2377.  
  2378. `-m'
  2379. `--time=mtime'
  2380. `--time=modify'
  2381.      Change the modification time only.
  2382.  
  2383. `-r FILE'
  2384. `--reference=FILE'
  2385.      Use the times of the reference FILE instead of the current time.
  2386.  
  2387. `-t MMDDhhmm[[CC]YY][.ss]'
  2388.      Use the argument (months, days, hours, minutes, optional century
  2389.      and years, optional seconds) instead of the current time.
  2390.  
  2391. 
  2392. File: fileutils.info,  Node: Disk usage,  Next: Index,  Prev: Changing file attributes,  Up: Top
  2393.  
  2394. Disk usage
  2395. **********
  2396.  
  2397.    No disk can hold an infinite amount of data.  These commands report
  2398. on how much disk storage is in use or available.  (This has nothing
  2399. much to do with how much *main memory*, i.e., RAM, a program is using
  2400. when it runs; for that, you want `ps' or `pstat' or `swap' or some such
  2401. command.)
  2402.  
  2403. * Menu:
  2404.  
  2405. * df invocation::               Report filesystem disk space usage.
  2406. * du invocation::               Estimate file space usage.
  2407. * sync invocation::             Synchronize memory and disk.
  2408.  
  2409. 
  2410. File: fileutils.info,  Node: df invocation,  Next: du invocation,  Up: Disk usage
  2411.  
  2412. `df': Report filesystem disk space usage
  2413. ========================================
  2414.  
  2415.    `df' reports the amount of disk space used and available on
  2416. filesystems.  Synopsis:
  2417.  
  2418.      df [OPTION]... [FILE]...
  2419.  
  2420.    With no arguments, `df' reports the space used and available on all
  2421. currently mounted filesystems (of all types).  Otherwise, `df' reports
  2422. on the filesystem containing each argument FILE.
  2423.  
  2424.    Disk space is shown in 1024-byte blocks by default, unless the
  2425. environment variable `POSIXLY_CORRECT' is set, in which case 512-byte
  2426. blocks are used (unless the `-k' option is given).
  2427.  
  2428.    If an argument FILE is a disk device file containing a mounted
  2429. filesystem, `df' shows the space available on that filesystem rather
  2430. than on the filesystem containing the device node (i.e., the root
  2431. filesystem).  GNU `df' does not attempt to determine the disk usage on
  2432. unmounted filesystems, because on most kinds of systems doing so
  2433. requires extremely nonportable intimate knowledge of filesystem
  2434. structures.
  2435.  
  2436.    The program accepts the following options.  Also see *Note Common
  2437. options::.
  2438.  
  2439. `-a'
  2440. `--all'
  2441.      Include in the listing filesystems that have a size of 0 blocks,
  2442.      which are omitted by default.  Such filesystems are typically
  2443.      special-purpose pseudo-filesystems, such as automounter entries.
  2444.      Also, filesystems of type "ignore" or "auto", supported by some
  2445.      operating systems, are only included if this option is specified.
  2446.  
  2447. `-h'
  2448. `--human-readable'
  2449.      Append a size letter such as `M' for megabytes to each size.
  2450.  
  2451. `-i'
  2452. `--inodes'
  2453.      List inode usage information instead of block usage.  An inode
  2454.      (short for index node) is contains information about a file such
  2455.      as its owner, permissions, timestamps, and location on the disk.
  2456.  
  2457. `-k'
  2458. `--kilobytes'
  2459.      Print sizes in 1024-byte blocks.  This overrides the environment
  2460.      variable `POSIXLY_CORRECT'.
  2461.  
  2462. `-m'
  2463. `--megabytes'
  2464.      Print sizes in megabyte (that 1,048,576 bytes) blocks.
  2465.  
  2466. `--no-sync'
  2467.      Do not invoke the `sync' system call before getting any usage data.
  2468.      This may make `df' run significantly faster on systems with many
  2469.      disks, but on some systems (notably SunOS) the results may be
  2470.      slightly out of date.  This is the default.
  2471.  
  2472. `-P'
  2473. `--portability'
  2474.      Use the POSIX output format.  This is like the default format
  2475.      except that the information about each filesystem is always
  2476.      printed on exactly one line; a mount device is never put on a line
  2477.      by itself.  This means that if the mount device name is more than
  2478.      20 characters long (e.g., for some network mounts), the columns
  2479.      are misaligned.
  2480.  
  2481. `--sync'
  2482.      Invoke the `sync' system call before getting any usage data.  On
  2483.      some systems (notably SunOS), doing this yields more up to date
  2484.      results, but in general this option makes `df' much slower,
  2485.      especially when there are many or very busy filesystems.
  2486.  
  2487. `-t FSTYPE'
  2488. `--type=FSTYPE'
  2489.      Limit the listing to filesystems of type FSTYPE.  Multiple
  2490.      filesystem types can be specified by giving multiple `-t' options.
  2491.      By default, nothing is omitted.
  2492.  
  2493. `-T'
  2494. `--print-type'
  2495.      Print each filesystem's type.  The types printed here are the same
  2496.      ones you can include or exclude with `-t' and `-x'.  The particular
  2497.      types printed are whatever is supported by the system.  Here are
  2498.      some of the common names (this list is certainly not exhaustive):
  2499.  
  2500.     `nfs'
  2501.           An NFS filesystem, i.e., one mounted over a network from
  2502.           another machine.  This is the one type name which seems to be
  2503.           used uniformly by all systems.
  2504.  
  2505.     `4.2, ufs, efs...'
  2506.           A filesystem on a locally-mounted hard disk.  (The system
  2507.           might even support more than one type here; Linux does.)
  2508.  
  2509.     `hsfs, cdfs'
  2510.           A filesystem on a CD-ROM drive.  HP-UX uses `cdfs', most other
  2511.           systems use `hsfs' (`hs' for `High Sierra').
  2512.  
  2513.     `pcfs'
  2514.           An MS-DOS filesystem, usually on a diskette.
  2515.  
  2516. `-x FSTYPE'
  2517. `--exclude-type=FSTYPE'
  2518.      Limit the listing to filesystems not of type FSTYPE.  Multiple
  2519.      filesystem types can be eliminated by giving multiple `-x'
  2520.      options.  By default, no filesystem types are omitted.
  2521.  
  2522. `-v'
  2523.      Ignored; for compatibility with System V versions of `df'.
  2524.  
  2525. 
  2526. File: fileutils.info,  Node: du invocation,  Next: sync invocation,  Prev: df invocation,  Up: Disk usage
  2527.  
  2528. `du': Estimate file space usage
  2529. ===============================
  2530.  
  2531.    `du' reports the amount of disk space used by the specified files
  2532. and for each subdirectory (of directory arguments).  Synopsis:
  2533.  
  2534.      du [OPTION]... [FILE]...
  2535.  
  2536.    With no arguments, `du' reports the disk space for the current
  2537. directory.  The output is in 1024-byte units by default, unless the
  2538. environment variable `POSIXLY_CORRECT' is set, in which case 512-byte
  2539. blocks are used (unless `-k' is specified).
  2540.  
  2541.    The program accepts the following options.  Also see *Note Common
  2542. options::.
  2543.  
  2544. `-a'
  2545. `--all'
  2546.      Show counts for all files, not just directories.
  2547.  
  2548. `-b'
  2549. `--bytes'
  2550.      Print sizes in bytes, instead of kilobytes.
  2551.  
  2552. `-c'
  2553. `--total'
  2554.      Print a grand total of all arguments after all arguments have been
  2555.      processed.  This can be used to find out the total disk usage of a
  2556.      given set of files or directories.
  2557.  
  2558. `-D'
  2559. `--dereference-args'
  2560.      Dereference symbolic links that are command line arguments.  Does
  2561.      not affect other symbolic links.  This is helpful for finding out
  2562.      the disk usage of directories, such as `/usr/tmp', which are often
  2563.      symbolic links.
  2564.  
  2565. `-h'
  2566. `--human-readable'
  2567.      Append a size letter, such as `M' for megabytes, to each size.
  2568.  
  2569. `-k'
  2570. `--kilobytes'
  2571.      Print sizes in kilobytes.  This overrides the environment variable
  2572.      `POSIXLY_CORRECT'.
  2573.  
  2574. `-l'
  2575. `--count-links'
  2576.      Count the size of all files, even if they have appeared already
  2577.      (as a hard link).
  2578.  
  2579. `-L'
  2580. `--dereference'
  2581.      Dereference symbolic links (show the disk space used by the file
  2582.      or directory that the link points to instead of the space used by
  2583.      the link).
  2584.  
  2585. `-m'
  2586. `--megabytes'
  2587.      Print sizes in megabyte (that 1,048,576 bytes) blocks.
  2588.  
  2589. `-s'
  2590. `--summarize'
  2591.      Display only a total for each argument.
  2592.  
  2593. `-S'
  2594. `--separate-dirs'
  2595.      Report the size of each directory separately, not including the
  2596.      sizes of subdirectories.
  2597.  
  2598. `-x'
  2599. `--one-file-system'
  2600.      Skip directories that are on different filesystems from the one
  2601.      that the argument being processed is on.
  2602.  
  2603.    On BSD systems, `du' reports sizes that are half the correct values
  2604. for files that are NFS-mounted from HP-UX systems.  On HP-UX systems,
  2605. it reports sizes that are twice the correct values for files that are
  2606. NFS-mounted from BSD systems.  This is due to a flaw in HP-UX; it also
  2607. affects the HP-UX `du' program.
  2608.  
  2609. 
  2610. File: fileutils.info,  Node: sync invocation,  Prev: du invocation,  Up: Disk usage
  2611.  
  2612. `sync': Synchronize data on disk with memory
  2613. ============================================
  2614.  
  2615.    `sync' writes any data buffered in memory out to disk.  This can
  2616. include (but is not limited to) modified superblocks, modified inodes,
  2617. and delayed reads and writes.  This must be implemented by the kernel;
  2618. The `sync' program does nothing but exercise the `sync' system call.
  2619.  
  2620.    The kernel keeps data in memory to avoid doing (relatively slow) disk
  2621. reads and writes.  This improves performance, but if the computer
  2622. crashes, data may be lost or the filesystem corrupted as a result.
  2623. `sync' ensures everything in memory is written to disk.
  2624.  
  2625.    Any arguments are ignored, except for a lone `--help' or `--version'
  2626. (*note Common options::.).
  2627.  
  2628. 
  2629. File: fileutils.info,  Node: Index,  Prev: Disk usage,  Up: Top
  2630.  
  2631. Index
  2632. *****
  2633.  
  2634. * Menu:
  2635.  
  2636. * - and Unix rm:                         rm invocation.
  2637. * -, removing files beginning with:      rm invocation.
  2638. * -1:                                    General output formatting.
  2639. * -a <1>:                                du invocation.
  2640. * -a <2>:                                df invocation.
  2641. * -a <3>:                                touch invocation.
  2642. * -a:                                    cp invocation.
  2643. * -A:                                    Which files are listed.
  2644. * -a:                                    Which files are listed.
  2645. * -all <1>:                              du invocation.
  2646. * -all <2>:                              df invocation.
  2647. * -all:                                  Which files are listed.
  2648. * -almost-all:                           Which files are listed.
  2649. * -archive:                              cp invocation.
  2650. * -b <1>:                                du invocation.
  2651. * -b <2>:                                ln invocation.
  2652. * -b <3>:                                mv invocation.
  2653. * -b <4>:                                install invocation.
  2654. * -b <5>:                                cp invocation.
  2655. * -b <6>:                                dircolors invocation.
  2656. * -b:                                    Formatting the file names.
  2657. * -B:                                    Which files are listed.
  2658. * -b:                                    Backup options.
  2659. * -backup <1>:                           ln invocation.
  2660. * -backup <2>:                           mv invocation.
  2661. * -backup <3>:                           install invocation.
  2662. * -backup <4>:                           cp invocation.
  2663. * -backup:                               Backup options.
  2664. * -bourne-shell:                         dircolors invocation.
  2665. * -bytes:                                du invocation.
  2666. * -c <1>:                                du invocation.
  2667. * -c <2>:                                touch invocation.
  2668. * -c <3>:                                chmod invocation.
  2669. * -c <4>:                                chgrp invocation.
  2670. * -c <5>:                                chown invocation.
  2671. * -c <6>:                                install invocation.
  2672. * -c:                                    dircolors invocation.
  2673. * -C:                                    General output formatting.
  2674. * -c:                                    Sorting the output.
  2675. * -c-shell:                              dircolors invocation.
  2676. * -changes <1>:                          chmod invocation.
  2677. * -changes <2>:                          chgrp invocation.
  2678. * -changes:                              chown invocation.
  2679. * -classify:                             General output formatting.
  2680. * -color:                                General output formatting.
  2681. * -count-links:                          du invocation.
  2682. * -csh:                                  dircolors invocation.
  2683. * -D:                                    du invocation.
  2684. * -d <1>:                                touch invocation.
  2685. * -d <2>:                                ln invocation.
  2686. * -d <3>:                                rm invocation.
  2687. * -d <4>:                                install invocation.
  2688. * -d:                                    cp invocation.
  2689. * -D:                                    What information is listed.
  2690. * -d:                                    Which files are listed.
  2691. * -date:                                 touch invocation.
  2692. * -dereference <1>:                      du invocation.
  2693. * -dereference:                          Which files are listed.
  2694. * -dereference-args:                     du invocation.
  2695. * -directory <1>:                        ln invocation.
  2696. * -directory <2>:                        rm invocation.
  2697. * -directory <3>:                        install invocation.
  2698. * -directory:                            Which files are listed.
  2699. * -dired:                                What information is listed.
  2700. * -escape:                               Formatting the file names.
  2701. * -exclude-type:                         df invocation.
  2702. * -f <1>:                                touch invocation.
  2703. * -f <2>:                                chmod invocation.
  2704. * -f <3>:                                chgrp invocation.
  2705. * -f <4>:                                chown invocation.
  2706. * -f:                                    ln invocation.
  2707. * -F:                                    ln invocation.
  2708. * -f <1>:                                rm invocation.
  2709. * -f <2>:                                mv invocation.
  2710. * -f:                                    cp invocation.
  2711. * -F:                                    General output formatting.
  2712. * -f:                                    Sorting the output.
  2713. * -force <1>:                            ln invocation.
  2714. * -force <2>:                            rm invocation.
  2715. * -force <3>:                            mv invocation.
  2716. * -force:                                cp invocation.
  2717. * -format <1>:                           General output formatting.
  2718. * -format:                               What information is listed.
  2719. * -full-time:                            General output formatting.
  2720. * -g:                                    install invocation.
  2721. * -G:                                    What information is listed.
  2722. * -g (ignored):                          ls invocation.
  2723. * -group:                                install invocation.
  2724. * -h <1>:                                du invocation.
  2725. * -h <2>:                                df invocation.
  2726. * -h:                                    chown invocation.
  2727. * -help:                                 Common options.
  2728. * -hide-control-chars:                   Formatting the file names.
  2729. * -human-readable <1>:                   du invocation.
  2730. * -human-readable:                       df invocation.
  2731. * -i <1>:                                df invocation.
  2732. * -i <2>:                                ln invocation.
  2733. * -i <3>:                                rm invocation.
  2734. * -i <4>:                                mv invocation.
  2735. * -i <5>:                                cp invocation.
  2736. * -i:                                    What information is listed.
  2737. * -I:                                    Which files are listed.
  2738. * -ignore-backups:                       Which files are listed.
  2739. * -ignore=PATTERN:                       Which files are listed.
  2740. * -inode:                                What information is listed.
  2741. * -inodes:                               df invocation.
  2742. * -interactive <1>:                      ln invocation.
  2743. * -interactive <2>:                      rm invocation.
  2744. * -interactive <3>:                      mv invocation.
  2745. * -interactive:                          cp invocation.
  2746. * -k <1>:                                du invocation.
  2747. * -k <2>:                                df invocation.
  2748. * -k:                                    General output formatting.
  2749. * -kilobytes <1>:                        du invocation.
  2750. * -kilobytes <2>:                        df invocation.
  2751. * -kilobytes:                            General output formatting.
  2752. * -L:                                    du invocation.
  2753. * -l <1>:                                du invocation.
  2754. * -l <2>:                                cp invocation.
  2755. * -l:                                    What information is listed.
  2756. * -L:                                    Which files are listed.
  2757. * -link:                                 cp invocation.
  2758. * -literal:                              Formatting the file names.
  2759. * -m <1>:                                du invocation.
  2760. * -m <2>:                                df invocation.
  2761. * -m <3>:                                touch invocation.
  2762. * -m <4>:                                mknod invocation.
  2763. * -m <5>:                                mkfifo invocation.
  2764. * -m <6>:                                mkdir invocation.
  2765. * -m <7>:                                install invocation.
  2766. * -m:                                    General output formatting.
  2767. * -megabytes <1>:                        du invocation.
  2768. * -megabytes:                            df invocation.
  2769. * -mode <1>:                             mknod invocation.
  2770. * -mode <2>:                             mkfifo invocation.
  2771. * -mode <3>:                             mkdir invocation.
  2772. * -mode:                                 install invocation.
  2773. * -n:                                    ln invocation.
  2774. * -N:                                    Formatting the file names.
  2775. * -n:                                    General output formatting.
  2776. * -no-create:                            touch invocation.
  2777. * -no-dereference <1>:                   chgrp invocation.
  2778. * -no-dereference <2>:                   chown invocation.
  2779. * -no-dereference <3>:                   ln invocation.
  2780. * -no-dereference:                       cp invocation.
  2781. * -no-group:                             What information is listed.
  2782. * -no-sync:                              df invocation.
  2783. * -numeric-uid-gid:                      General output formatting.
  2784. * -o <1>:                                install invocation.
  2785. * -o:                                    What information is listed.
  2786. * -one-file-system <1>:                  du invocation.
  2787. * -one-file-system:                      cp invocation.
  2788. * -owner:                                install invocation.
  2789. * -P:                                    df invocation.
  2790. * -p <1>:                                rmdir invocation.
  2791. * -p:                                    mkdir invocation.
  2792. * -P:                                    cp invocation.
  2793. * -p <1>:                                cp invocation.
  2794. * -p:                                    dircolors invocation.
  2795. * -parents <1>:                          rmdir invocation.
  2796. * -parents <2>:                          mkdir invocation.
  2797. * -parents:                              cp invocation.
  2798. * -portability:                          df invocation.
  2799. * -preserve:                             cp invocation.
  2800. * -print-database:                       dircolors invocation.
  2801. * -print-type:                           df invocation.
  2802. * -Q:                                    Formatting the file names.
  2803. * -q:                                    Formatting the file names.
  2804. * -quiet <1>:                            chmod invocation.
  2805. * -quiet <2>:                            chgrp invocation.
  2806. * -quiet:                                chown invocation.
  2807. * -quote-name:                           Formatting the file names.
  2808. * -r:                                    touch invocation.
  2809. * -R <1>:                                chmod invocation.
  2810. * -R <2>:                                chgrp invocation.
  2811. * -R <3>:                                chown invocation.
  2812. * -R:                                    rm invocation.
  2813. * -r:                                    rm invocation.
  2814. * -R:                                    cp invocation.
  2815. * -r:                                    Sorting the output.
  2816. * -R:                                    Which files are listed.
  2817. * -recursive <1>:                        chmod invocation.
  2818. * -recursive <2>:                        chgrp invocation.
  2819. * -recursive <3>:                        chown invocation.
  2820. * -recursive <4>:                        rm invocation.
  2821. * -recursive <5>:                        cp invocation.
  2822. * -recursive:                            Which files are listed.
  2823. * -reference:                            touch invocation.
  2824. * -reverse:                              Sorting the output.
  2825. * -S:                                    du invocation.
  2826. * -s:                                    du invocation.
  2827. * -S:                                    ln invocation.
  2828. * -s:                                    ln invocation.
  2829. * -S <1>:                                mv invocation.
  2830. * -S:                                    install invocation.
  2831. * -s:                                    install invocation.
  2832. * -S:                                    cp invocation.
  2833. * -s:                                    cp invocation.
  2834. * -S:                                    Sorting the output.
  2835. * -s:                                    What information is listed.
  2836. * -S:                                    Backup options.
  2837. * -separate-dirs:                        du invocation.
  2838. * -sh:                                   dircolors invocation.
  2839. * -silent <1>:                           chmod invocation.
  2840. * -silent <2>:                           chgrp invocation.
  2841. * -silent:                               chown invocation.
  2842. * -size:                                 What information is listed.
  2843. * -sort:                                 Sorting the output.
  2844. * -sparse=WHEN:                          cp invocation.
  2845. * -strip:                                install invocation.
  2846. * -suffix <1>:                           ln invocation.
  2847. * -suffix <2>:                           mv invocation.
  2848. * -suffix <3>:                           install invocation.
  2849. * -suffix <4>:                           cp invocation.
  2850. * -suffix:                               Backup options.
  2851. * -summarize:                            du invocation.
  2852. * -symbolic:                             ln invocation.
  2853. * -symbolic-link:                        cp invocation.
  2854. * -sync:                                 df invocation.
  2855. * -T:                                    df invocation.
  2856. * -t:                                    df invocation.
  2857. * -T:                                    General output formatting.
  2858. * -t:                                    Sorting the output.
  2859. * -tabsize:                              General output formatting.
  2860. * -time <1>:                             touch invocation.
  2861. * -time:                                 Sorting the output.
  2862. * -total:                                du invocation.
  2863. * -type:                                 df invocation.
  2864. * -u <1>:                                mv invocation.
  2865. * -u:                                    cp invocation.
  2866. * -U:                                    Sorting the output.
  2867. * -u:                                    Sorting the output.
  2868. * -update <1>:                           mv invocation.
  2869. * -update:                               cp invocation.
  2870. * -v <1>:                                chmod invocation.
  2871. * -v <2>:                                chgrp invocation.
  2872. * -v:                                    chown invocation.
  2873. * -V:                                    ln invocation.
  2874. * -v <1>:                                ln invocation.
  2875. * -v:                                    rm invocation.
  2876. * -V:                                    mv invocation.
  2877. * -v:                                    mv invocation.
  2878. * -V <1>:                                install invocation.
  2879. * -V:                                    cp invocation.
  2880. * -v:                                    cp invocation.
  2881. * -V:                                    Backup options.
  2882. * -verbose <1>:                          chmod invocation.
  2883. * -verbose <2>:                          chgrp invocation.
  2884. * -verbose <3>:                          chown invocation.
  2885. * -verbose <4>:                          mkdir invocation.
  2886. * -verbose <5>:                          ln invocation.
  2887. * -verbose <6>:                          rm invocation.
  2888. * -verbose <7>:                          mv invocation.
  2889. * -verbose:                              cp invocation.
  2890. * -version:                              Common options.
  2891. * -version-control <1>:                  ln invocation.
  2892. * -version-control <2>:                  mv invocation.
  2893. * -version-control <3>:                  install invocation.
  2894. * -version-control <4>:                  cp invocation.
  2895. * -version-control:                      Backup options.
  2896. * -w:                                    General output formatting.
  2897. * -width:                                General output formatting.
  2898. * -x <1>:                                du invocation.
  2899. * -x <2>:                                df invocation.
  2900. * -x <3>:                                cp invocation.
  2901. * -x:                                    General output formatting.
  2902. * -X:                                    Sorting the output.
  2903. * 4.2 filesystem type:                   df invocation.
  2904. * abbreviations for months:              Calendar date item.
  2905. * access permissions, changing:          chmod invocation.
  2906. * access time, changing:                 touch invocation.
  2907. * access time, sorting files by:         Sorting the output.
  2908. * across, listing files:                 General output formatting.
  2909. * adding permissions:                    Setting Permissions.
  2910. * ago in date strings:                   Relative item in date strings.
  2911. * Alaska-Hawaii Time:                    Timezone item.
  2912. * alternate ebcdic, converting to:       dd invocation.
  2913. * always color option:                   General output formatting.
  2914. * am in date strings:                    Time of day item.
  2915. * append-only directories:               Mode Structure.
  2916. * appropriate privileges:                install invocation.
  2917. * ascii, converting to:                  dd invocation.
  2918. * atime, changing:                       touch invocation.
  2919. * atime, sorting files by:               Sorting the output.
  2920. * Atlantic Standard Time:                Timezone item.
  2921. * attributes, file:                      Changing file attributes.
  2922. * authors of getdate:                    Authors of getdate.
  2923. * auto color option:                     General output formatting.
  2924. * automounter filesystems:               df invocation.
  2925. * Azores Time:                           Timezone item.
  2926. * b for block special file:              mknod invocation.
  2927. * backslash sequences for file names:    Formatting the file names.
  2928. * backup files, ignoring:                Which files are listed.
  2929. * backup files, type made:               Backup options.
  2930. * backup options:                        Backup options.
  2931. * backup suffix:                         Backup options.
  2932. * backups, making <1>:                   ln invocation.
  2933. * backups, making <2>:                   mv invocation.
  2934. * backups, making <3>:                   install invocation.
  2935. * backups, making <4>:                   cp invocation.
  2936. * backups, making:                       Backup options.
  2937. * backups, making only:                  cp invocation.
  2938. * Baghdad Time:                          Timezone item.
  2939. * beginning of time, for Unix:           Date input formats.
  2940. * Bellovin, Steven M.:                   Authors of getdate.
  2941. * Berets, Jim:                           Authors of getdate.
  2942. * Berry, K.:                             Authors of getdate.
  2943. * block (space-padding):                 dd invocation.
  2944. * block size:                            dd invocation.
  2945. * block size of conversion:              dd invocation.
  2946. * block size of input:                   dd invocation.
  2947. * block size of output:                  dd invocation.
  2948. * block special files:                   mknod invocation.
  2949. * block special files, creating:         mknod invocation.
  2950. * Bourne shell syntax for color setup:   dircolors invocation.
  2951. * bs:                                    dd invocation.
  2952. * BSD touch compatibility:               touch invocation.
  2953. * buffered character file:               mknod invocation.
  2954. * bugs, reporting:                       Introduction.
  2955. * byte-swapping:                         dd invocation.
  2956. * c for character special file:          mknod invocation.
  2957. * C shell syntax for color setup:        dircolors invocation.
  2958. * calendar date item:                    Calendar date item.
  2959. * case, ignored in dates:                General date syntax.
  2960. * cbs:                                   dd invocation.
  2961. * CD-ROM filesystem type:                df invocation.
  2962. * cdfs filesystem type:                  df invocation.
  2963. * Central Alaska Time:                   Timezone item.
  2964. * Central European Time:                 Timezone item.
  2965. * Central Standard Time:                 Timezone item.
  2966. * changed files, verbosely describing:   chgrp invocation.
  2967. * changed owners, verbosely describing:  chown invocation.
  2968. * changing access permissions:           chmod invocation.
  2969. * changing file attributes:              Changing file attributes.
  2970. * changing file ownership:               chown invocation.
  2971. * changing file timestamps:              touch invocation.
  2972. * changing group ownership <1>:          chgrp invocation.
  2973. * changing group ownership:              chown invocation.
  2974. * changing special permissions:          Changing Special Permissions.
  2975. * character special files:               mknod invocation.
  2976. * character special files, creating:     mknod invocation.
  2977. * chgrp:                                 chgrp invocation.
  2978. * China Coast Time:                      Timezone item.
  2979. * chmod:                                 chmod invocation.
  2980. * chown:                                 chown invocation.
  2981. * color database, printing:              dircolors invocation.
  2982. * color setup:                           dircolors invocation.
  2983. * color, distinguishing file types with: General output formatting.
  2984. * COLUMNS:                               General output formatting.
  2985. * commas, outputting between files:      General output formatting.
  2986. * comments, in dates:                    General date syntax.
  2987. * common options:                        Common options.
  2988. * conditional executability:             Conditional Executability.
  2989. * conv:                                  dd invocation.
  2990. * converstion block size:                dd invocation.
  2991. * converting while copying a file:       dd invocation.
  2992. * copying directories recursively:       cp invocation.
  2993. * copying existing permissions:          Copying Permissions.
  2994. * copying files and directories:         cp invocation.
  2995. * copying files and setting attributes:  install invocation.
  2996. * count:                                 dd invocation.
  2997. * cp:                                    cp invocation.
  2998. * crashes and corruption:                sync invocation.
  2999. * creating directories:                  mkdir invocation.
  3000. * creating FIFOs (named pipes):          mkfifo invocation.
  3001. * creating links (hard or soft):         ln invocation.
  3002. * csh syntax for color setup:            dircolors invocation.
  3003. * ctime, sorting by:                     Sorting the output.
  3004. * database for color setup, printing:    dircolors invocation.
  3005. * date format, ISO 8601:                 Calendar date item.
  3006. * date input formats:                    Date input formats.
  3007. * day in date strings:                   Relative item in date strings.
  3008. * day of week item:                      Day of week item.
  3009. * daylight savings time:                 Timezone item.
  3010. * dd:                                    dd invocation.
  3011. * dereferencing symbolic links:          ln invocation.
  3012. * device file, disk:                     df invocation.
  3013. * df:                                    df invocation.
  3014. * dir:                                   dir invocation.
  3015. * dircolors:                             dircolors invocation.
  3016. * directories, copying:                  cp invocation.
  3017. * directories, copying recursively:      cp invocation.
  3018. * directories, creating:                 mkdir invocation.
  3019. * directories, creating with given attributes: install invocation.
  3020. * directories, removing (recursively):   rm invocation.
  3021. * directories, removing empty:           rmdir invocation.
  3022. * directories, removing with unlink:     rm invocation.
  3023. * directory listing:                     ls invocation.
  3024. * directory listing, brief:              dir invocation.
  3025. * directory listing, recursive:          Which files are listed.
  3026. * directory listing, verbose:            vdir invocation.
  3027. * directory order, listing by:           Sorting the output.
  3028. * dired Emacs mode support:              What information is listed.
  3029. * disk device file:                      df invocation.
  3030. * disk usage:                            Disk usage.
  3031. * disk usage by filesystem:              df invocation.
  3032. * disk usage for files:                  du invocation.
  3033. * diskette filesystem:                   df invocation.
  3034. * displacement of dates:                 Relative item in date strings.
  3035. * DOS filesystem:                        df invocation.
  3036. * du:                                    du invocation.
  3037. * East Australian Standard Time:         Timezone item.
  3038. * Eastern European Time:                 Timezone item.
  3039. * Eastern Standard Time:                 Timezone item.
  3040. * ebcdic, converting to:                 dd invocation.
  3041. * efs filesystem type:                   df invocation.
  3042. * empty files, creating:                 touch invocation.
  3043. * epoch, for Unix:                       Date input formats.
  3044. * error messages, omitting <1>:          chmod invocation.
  3045. * error messages, omitting <2>:          chgrp invocation.
  3046. * error messages, omitting:              chown invocation.
  3047. * executables and file type, marking:    General output formatting.
  3048. * execute permission:                    Mode Structure.
  3049. * execute permission, symbolic:          Setting Permissions.
  3050. * existing backup method:                Backup options.
  3051. * extension, sorting files by:           Sorting the output.
  3052. * FIFOs, creating:                       mkfifo invocation.
  3053. * file attributes, changing:             Changing file attributes.
  3054. * file information, preserving:          cp invocation.
  3055. * file ownership, changing:              chown invocation.
  3056. * file permissions:                      File permissions.
  3057. * file permissions, numeric:             Numeric Modes.
  3058. * file space usage:                      du invocation.
  3059. * file timestamps, changing:             touch invocation.
  3060. * file type and executables, marking:    General output formatting.
  3061. * file type, marking:                    General output formatting.
  3062. * file types:                            Special file types.
  3063. * file types, special:                   Special file types.
  3064. * file utilities:                        Top.
  3065. * files beginning with -, removing:      rm invocation.
  3066. * files, copying:                        cp invocation.
  3067. * filesystem disk usage:                 df invocation.
  3068. * filesystem space, retrieving current data more slowly: df invocation.
  3069. * filesystem space, retrieving old data more quickly: df invocation.
  3070. * filesystem types, limiting output to certain: df invocation.
  3071. * filesystem types, printing:            df invocation.
  3072. * filesystems and hard links:            ln invocation.
  3073. * filesystems, omitting copying to different: cp invocation.
  3074. * first in date strings:                 General date syntax.
  3075. * fortnight in date strings:             Relative item in date strings.
  3076. * French Winter Time:                    Timezone item.
  3077. * fsck:                                  rm invocation.
  3078. * general date syntax:                   General date syntax.
  3079. * getdate:                               Date input formats.
  3080. * giving away permissions:               Umask and Protection.
  3081. * grand total of disk space:             du invocation.
  3082. * Greenwich Mean Time:                   Timezone item.
  3083. * group owner, default:                  Mode Structure.
  3084. * group ownership of installed files, setting: install invocation.
  3085. * group ownership, changing:             chgrp invocation.
  3086. * group ownerships, changing:            chown invocation.
  3087. * group, permissions for:                Setting Permissions.
  3088. * Guam Standard Time:                    Timezone item.
  3089. * hard links to directories:             ln invocation.
  3090. * hard links, counting in du:            du invocation.
  3091. * hard links, creating:                  ln invocation.
  3092. * hard links, preserving:                cp invocation.
  3093. * Hawaii Standard Time:                  Timezone item.
  3094. * help, online:                          Common options.
  3095. * High Sierra filesystem:                df invocation.
  3096. * history:                               Introduction.
  3097. * holes, copying files with:             cp invocation.
  3098. * horizontal, listing files:             General output formatting.
  3099. * hour in date strings:                  Relative item in date strings.
  3100. * hsfs filesystem type:                  df invocation.
  3101. * human-readable df output <1>:          du invocation.
  3102. * human-readable df output:              df invocation.
  3103. * ibs:                                   dd invocation.
  3104. * if:                                    dd invocation.
  3105. * ignore filesystems:                    df invocation.
  3106. * inode number, printing:                What information is listed.
  3107. * inode usage:                           df invocation.
  3108. * inodes, written buffered:              sync invocation.
  3109. * input block size:                      dd invocation.
  3110. * install:                               install invocation.
  3111. * International Date Line East:          Timezone item.
  3112. * International Date Line West:          Timezone item.
  3113. * introduction:                          Introduction.
  3114. * ISO 8601 date format:                  Calendar date item.
  3115. * items in date strings:                 General date syntax.
  3116. * Japan Standard Time:                   Timezone item.
  3117. * kilobytes for filesystem sizes:        df invocation.
  3118. * last DAY:                              Day of week item.
  3119. * last in date strings:                  General date syntax.
  3120. * lcase, converting to:                  dd invocation.
  3121. * lchown <1>:                            chgrp invocation.
  3122. * lchown:                                chown invocation.
  3123. * leading directories, creating missing: install invocation.
  3124. * links, creating:                       ln invocation.
  3125. * Linux filesystem types:                df invocation.
  3126. * ln:                                    ln invocation.
  3127. * local filesystem types:                df invocation.
  3128. * long ls format:                        What information is listed.
  3129. * ls:                                    ls invocation.
  3130. * LS_COLORS:                             dircolors invocation.
  3131. * MacKenzie, David:                      Authors of getdate.
  3132. * Makefiles, installing programs in:     install invocation.
  3133. * manipulating files:                    Basic operations.
  3134. * megabytes for filesystem sizes <1>:    du invocation.
  3135. * megabytes for filesystem sizes:        df invocation.
  3136. * Meyering, Jim:                         Authors of getdate.
  3137. * Middle European Time:                  Timezone item.
  3138. * Middle European Winter Time:           Timezone item.
  3139. * midnight in date strings:              Time of day item.
  3140. * minute in date strings:                Relative item in date strings.
  3141. * minutes, timezone correction by:       Time of day item.
  3142. * mkdir:                                 mkdir invocation.
  3143. * mkfifo:                                mkfifo invocation.
  3144. * mknod:                                 mknod invocation.
  3145. * modes and umask:                       Umask and Protection.
  3146. * modes of created directories, setting: mkdir invocation.
  3147. * modes of created FIFOs, setting:       mkfifo invocation.
  3148. * modification time, sorting files by:   Sorting the output.
  3149. * modify time, changing:                 touch invocation.
  3150. * month in date strings:                 Relative item in date strings.
  3151. * month names in date strings:           Calendar date item.
  3152. * months, written-out:                   General date syntax.
  3153. * Mountain Standard Time:                Timezone item.
  3154. * MS-DOS filesystem:                     df invocation.
  3155. * mtime, changing:                       touch invocation.
  3156. * multiple changes to permissions:       Multiple Changes.
  3157. * multipliers after numbers:             dd invocation.
  3158. * mv:                                    mv invocation.
  3159. * named pipes, creating:                 mkfifo invocation.
  3160. * New Zealand Standard Time:             Timezone item.
  3161. * newer files, copying only:             cp invocation.
  3162. * newer files, moving only:              mv invocation.
  3163. * next DAY:                              Day of week item.
  3164. * next in date strings:                  General date syntax.
  3165. * NFS filesystem type:                   df invocation.
  3166. * NFS mounts from BSD to HP-UX <1>:      du invocation.
  3167. * NFS mounts from BSD to HP-UX:          What information is listed.
  3168. * noerror:                               dd invocation.
  3169. * Nome Standard Time:                    Timezone item.
  3170. * non-directories, copying as special files: cp invocation.
  3171. * none color option:                     General output formatting.
  3172. * none, sorting option for ls:           Sorting the output.
  3173. * noon in date strings:                  Time of day item.
  3174. * notrunc:                               dd invocation.
  3175. * now in date strings:                   Relative item in date strings.
  3176. * numbered backup method:                Backup options.
  3177. * numbers, written-out:                  General date syntax.
  3178. * numeric modes:                         Numeric Modes.
  3179. * numeric uid and gid:                   General output formatting.
  3180. * obs:                                   dd invocation.
  3181. * octal numbers for file modes:          Numeric Modes.
  3182. * of:                                    dd invocation.
  3183. * one filesystem, restricting du to:     du invocation.
  3184. * one-line output format:                df invocation.
  3185. * ordinal numbers:                       General date syntax.
  3186. * other permissions:                     Setting Permissions.
  3187. * output block size:                     dd invocation.
  3188. * output format, portable:               df invocation.
  3189. * owner of file, permissions for:        Setting Permissions.
  3190. * owner, default:                        Mode Structure.
  3191. * ownership of installed files, setting: install invocation.
  3192. * p for FIFO file:                       mknod invocation.
  3193. * Pacific Standard Time:                 Timezone item.
  3194. * parent directories and cp:             cp invocation.
  3195. * parent directories, creating:          mkdir invocation.
  3196. * parent directories, creating missing:  install invocation.
  3197. * parent directories, removing:          rmdir invocation.
  3198. * PC filesystem:                         df invocation.
  3199. * pcfs:                                  df invocation.
  3200. * permissions of files:                  File permissions.
  3201. * permissions of installed files, setting: install invocation.
  3202. * permissions, changing access:          chmod invocation.
  3203. * permissions, copying existing:         Copying Permissions.
  3204. * permissions, for changing file timestamps: touch invocation.
  3205. * permissions, output by ls:             What information is listed.
  3206. * Pinard, F.:                            Authors of getdate.
  3207. * pm in date strings:                    Time of day item.
  3208. * portable output format:                df invocation.
  3209. * POSIX output format:                   df invocation.
  3210. * POSIX.2:                               Introduction.
  3211. * POSIXLY_CORRECT:                       df invocation.
  3212. * POSIXLY_CORRECT, overridden by df -k:  df invocation.
  3213. * POSIXLY_CORRECT, overridden by du -k:  du invocation.
  3214. * POSIXLY_CORRECT, overridden by ls -k:  General output formatting.
  3215. * POSIXLY_CORRECT, overrides ls -s:      What information is listed.
  3216. * printing color database:               dircolors invocation.
  3217. * prompting, and ln:                     ln invocation.
  3218. * prompting, and mv:                     mv invocation.
  3219. * prompting, and rm:                     rm invocation.
  3220. * prompts, forcing:                      mv invocation.
  3221. * prompts, omitting:                     mv invocation.
  3222. * pure numbers in date strings:          Pure numbers in date strings.
  3223. * read errors, ignoring:                 dd invocation.
  3224. * read permission:                       Mode Structure.
  3225. * read permission, symbolic:             Setting Permissions.
  3226. * read system call, and holes:           cp invocation.
  3227. * recursive directory listing:           Which files are listed.
  3228. * recursively changing access permissions: chmod invocation.
  3229. * recursively changing file ownership:   chown invocation.
  3230. * recursively changing group ownership:  chgrp invocation.
  3231. * recursively copying directories:       cp invocation.
  3232. * relative items in date strings:        Relative item in date strings.
  3233. * removing empty directories:            rmdir invocation.
  3234. * removing files or directories:         rm invocation.
  3235. * removing permissions:                  Setting Permissions.
  3236. * reverse sorting:                       Sorting the output.
  3237. * rm:                                    rm invocation.
  3238. * rmdir:                                 rmdir invocation.
  3239. * root as default owner:                 install invocation.
  3240. * Salz, Rich:                            Authors of getdate.
  3241. * seek:                                  dd invocation.
  3242. * self-backups:                          cp invocation.
  3243. * setgid:                                Mode Structure.
  3244. * setting permissions:                   Setting Permissions.
  3245. * setuid:                                Mode Structure.
  3246. * setup for color:                       dircolors invocation.
  3247. * sh syntax for color setup:             dircolors invocation.
  3248. * SHELL environment variable, and color: dircolors invocation.
  3249. * simple backup method:                  Backup options.
  3250. * SIMPLE_BACKUP_SUFFIX:                  Backup options.
  3251. * single-column output of files:         General output formatting.
  3252. * size of files, reporting:              What information is listed.
  3253. * size of files, sorting files by:       Sorting the output.
  3254. * skip:                                  dd invocation.
  3255. * sorting ls output:                     Sorting the output.
  3256. * sparse files, copying:                 cp invocation.
  3257. * special file types:                    Special file types.
  3258. * special files:                         mknod invocation.
  3259. * status time, sorting by:               Sorting the output.
  3260. * sticky:                                Mode Structure.
  3261. * stripping symbol table information:    install invocation.
  3262. * subtracting permissions:               Setting Permissions.
  3263. * superblock, writing:                   sync invocation.
  3264. * swab (byte-swapping):                  dd invocation.
  3265. * swap space, saving text image in:      Mode Structure.
  3266. * Swedish Winter Time:                   Timezone item.
  3267. * symbol table information, stripping:   install invocation.
  3268. * symbolic (soft) links, creating:       ln invocation.
  3269. * symbolic links, changing group:        chgrp invocation.
  3270. * symbolic links, changing owner:        chown invocation.
  3271. * symbolic links, copying:               cp invocation.
  3272. * symbolic links, copying with:          cp invocation.
  3273. * symbolic links, dereferencing:         Which files are listed.
  3274. * symbolic links, permissions of:        chmod invocation.
  3275. * symbolic modes:                        Symbolic Modes.
  3276. * sync:                                  sync invocation.
  3277. * sync (padding with nulls):             dd invocation.
  3278. * synchronize disk and memory:           sync invocation.
  3279. * terminal, using color iff:             General output formatting.
  3280. * text image, saving in swap space:      Mode Structure.
  3281. * this in date strings:                  Relative item in date strings.
  3282. * time:                                  touch invocation.
  3283. * time of day item:                      Time of day item.
  3284. * timestamps, changing file:             touch invocation.
  3285. * timezone correction:                   Time of day item.
  3286. * timezone item:                         Timezone item.
  3287. * today in date strings:                 Relative item in date strings.
  3288. * tomorrow in date strings:              Relative item in date strings.
  3289. * touch:                                 touch invocation.
  3290. * truncating output file, avoiding:      dd invocation.
  3291. * u for unbuffered character special file: mknod invocation.
  3292. * ucase, converting to:                  dd invocation.
  3293. * ufs filesystem type:                   df invocation.
  3294. * umask and modes:                       Umask and Protection.
  3295. * unblock:                               dd invocation.
  3296. * unbuffered character special file:     mknod invocation.
  3297. * Universal Coordinated Time:            Timezone item.
  3298. * unlink:                                rm invocation.
  3299. * unsorted directory listing:            Sorting the output.
  3300. * use time, changing:                    touch invocation.
  3301. * use time, sorting files by:            Sorting the output.
  3302. * USSR Zone:                             Timezone item.
  3303. * utilities for file handling:           Top.
  3304. * vdir:                                  vdir invocation.
  3305. * verbose ls format:                     What information is listed.
  3306. * version number, finding:               Common options.
  3307. * version-control Emacs variable:        Backup options.
  3308. * VERSION_CONTROL:                       Backup options.
  3309. * vertical sorted files in columns:      General output formatting.
  3310. * week in date strings:                  Relative item in date strings.
  3311. * West African Time:                     Timezone item.
  3312. * West Australian Standard Time:         Timezone item.
  3313. * Western European Time:                 Timezone item.
  3314. * write permission:                      Mode Structure.
  3315. * write permission, symbolic:            Setting Permissions.
  3316. * year in date strings:                  Relative item in date strings.
  3317. * yesterday in date strings:             Relative item in date strings.
  3318. * Yukon Standard Time:                   Timezone item.
  3319.  
  3320.  
  3321. 
  3322. Tag Table:
  3323. Node: Top2475
  3324. Node: Introduction3200
  3325. Node: Common options4392
  3326. Node: Backup options4964
  3327. Node: File permissions6561
  3328. Node: Mode Structure7148
  3329. Node: Symbolic Modes9281
  3330. Node: Setting Permissions10284
  3331. Node: Copying Permissions12826
  3332. Node: Changing Special Permissions13615
  3333. Node: Conditional Executability15456
  3334. Node: Multiple Changes16078
  3335. Node: Umask and Protection17731
  3336. Node: Numeric Modes18825
  3337. Node: Date input formats20660
  3338. Node: General date syntax23115
  3339. Node: Calendar date item24566
  3340. Node: Time of day item26521
  3341. Node: Timezone item28129
  3342. Node: Day of week item31420
  3343. Node: Relative item in date strings32404
  3344. Node: Pure numbers in date strings34335
  3345. Node: Authors of getdate35319
  3346. Node: Directory listing36056
  3347. Node: ls invocation36534
  3348. Node: Which files are listed37974
  3349. Node: What information is listed39236
  3350. Node: Sorting the output42973
  3351. Node: General output formatting44749
  3352. Node: Formatting the file names47707
  3353. Node: dir invocation48360
  3354. Node: vdir invocation48715
  3355. Node: dircolors invocation49037
  3356. Node: Basic operations50422
  3357. Node: cp invocation50979
  3358. Node: dd invocation56193
  3359. Node: install invocation58675
  3360. Node: mv invocation61462
  3361. Node: rm invocation63475
  3362. Node: Special file types65328
  3363. Node: ln invocation66612
  3364. Node: mkdir invocation70342
  3365. Node: mkfifo invocation71465
  3366. Node: mknod invocation72359
  3367. Node: rmdir invocation73915
  3368. Node: Changing file attributes74541
  3369. Node: chown invocation75352
  3370. Node: chgrp invocation77261
  3371. Node: chmod invocation78269
  3372. Node: touch invocation79586
  3373. Node: Disk usage81213
  3374. Node: df invocation81826
  3375. Node: du invocation86174
  3376. Node: sync invocation88663
  3377. Node: Index89484
  3378. 
  3379. End Tag Table
  3380.